Reputation: 11653
I'm following along with Big Nerd Ranch's iOS programming book. In chapter 11, it has us control drag from a camera button into the method area of a DetailViewController.h
file. The instructions tell us to select action
from the connection drop down menu, however, the only options that are available when I do this are outlet
and Outlet Collection
.
In the book, the result is supposed to look like
- (IBAction)takePicture:(id)sender;
However, in my case, I get this when I choose the outlet
option
@property (weak, nonatomic) IBOutlet UIToolbar *takePhoto;
I'm concerned that if I just delete the code and replace it with what it says in the book, I'll still have the problem of not having established the proper connections via the control click and drag. Can you tell me what I might have done wrong when it failed to create an action?
Upvotes: 1
Views: 242
Reputation: 11653
The problem was that I didn't control drag from the camera button, but rather the toolbar in which it was contained. Hence the action button wasn't available.
Upvotes: 1