Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Interface Builder will not see action methods

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.

like image 782
Callaghan001 Avatar asked Feb 26 '23 05:02

Callaghan001


1 Answers

I fixed this problem by reading in the Class file manually from Interface Builder. Just do File -> Read Class -> find the .h file you defined the IBAction in. -> open! Then Interface builder will say something like "one Class file parsed"

like image 111
Whopper Avatar answered Mar 08 '23 02:03

Whopper