Can't get the methods at interface builder
I declared one method in sample.h and implemented in sample.m . Now i want to perform one action through connecting to a button and that method. but the files owner doesn't show any of my methods. 开发者_如何学JAVAWhats the problem.. Can anyone help me. i am new to this.
Thanks in Advance.
Have you specified that the File's Owner is of type sample? You can do that on the Identity tab in Interface Builder.
If sample is not a subclass of UIViewController you would most likely add an NSObject in Interface Builder and then set the Type to sample. You would also most likely have to add an IBOutlet to your view controller/File's Owner of type sample and connect it to the sample object in IB.
You want to make a function called on button press event.
so declare method in .h file as -(IBAction) click:(id)sender
then it shows in file's owner inspector.Make connection with button for touchUpInside.
精彩评论