Setting targets and actions


#1

To make this happen i have to Control-drag the showQuestion button from the canvas to File’s Owner. File’s Owner will then highlight. For no reason this doesn’t work and i can’t find a way to make this happen, what am i doing wrong? :frowning:


#2

I have the same problem. File’s Owner does not get highlighted and I cannot create the target-action connections. Could anybody provide some suggestion? Thank you.


#3

That happened to me too…I ended up trying a few random things like deleting and retyping the code, saving the file before attempting to drag to File’s Owner, and exiting and relaunching Xcode. Not sure which of those did the trick, but it started working. Maybe there’s a bug?


#4

What is the trick to getting around this :question:
Hello, community :exclamation:


#5

In the book, it shows the following:

@implementation

  • (IBAction)showQuestion:(id)sender

I believe what it should show is this:

@implementation BNRQuizViewController

  • (IBAction)showQuestion:(id)sender

    Whether or not that is the correct solution, that is up for interpretation. But, that worked for me. :wink:

#6

This fixed the issue for me, as well. Thank you!


#7

[quote=“magneticrd”]In the book, it shows the following:

@implementation

  • (IBAction)showQuestion:(id)sender

I believe what it should show is this:

@implementation BNRQuizViewController

  • (IBAction)showQuestion:(id)sender

    Whether or not that is the correct solution, that is up for interpretation. But, that worked for me. :wink:[/quote]

Phew !! This helped me too…


#8

[quote=“sajinseethi”][quote=“magneticrd”]In the book, it shows the following:

@implementation

  • (IBAction)showQuestion:(id)sender

I believe what it should show is this:

@implementation BNRQuizViewController

  • (IBAction)showQuestion:(id)sender

    Whether or not that is the correct solution, that is up for interpretation. But, that worked for me. :wink:[/quote]

Phew !! This helped me too…[/quote]

I’m having the same problem, and this did not help. Currently using Xcode version 5.1 (5B130a). Any other tips on what might work?


#9

+1

using Xcode 5.1.1, OS X 10.9.2

help?


#10

d’oh! I had IBaction instead of IBAction. Unfortunately the IDE hint on that is not very clear, if you don’t know what you’re doing (which is kind of by definition in chapter 1).