I am trying to hook up a UIButton
to a IBAction
in interface builder but IB will not show the method that I defined as an option to hook it up to.
- (IBAction)someAction:(id)sender;
That is what I have in the h file, and then in the M file I have
- (IBAction)someAction:(id)sender{
NSLog(@"Button Tapped."); }
The IB Document is connected to that class i know because that class also has a UIPicker
, and that connects fine.
Any help would be brilliant on this,
Thanks, Callaghan001.
Make sure you're actually wiring up the handler for the button's event (probably touch up inside) and not the button itself. So instead of dragging directly from the button, either ctrl-click the button to see its connections and drag from its touch up inside event to the target, or ctrl-click the target, find the action, and drag from that to the button. If the action doesn't show up on the target in these cases, and you're sure interface builder knows what class it is, then I'm baffled.