Reputation: 578
I'm new IOS and XCode. I added some bottuns to my IPhone app and now I want to add to them functionality. I found this tutorial.
The problem is that when I drag the button to ViewControler.h it bounces back.
Please advice. Thanks, Nahum
Upvotes: 0
Views: 393
Reputation: 1163
You can make UIButtons or any UIControl one of two ways
I think you are talking about the second method.
In the second method you take UIButtons in class:
@interface className : UIViewController{
IBOutlet UIButton *buttonName;
}
Now you will have to click on the .xib file and then you have to select a file below responder; after that open connection connection inspector. Now you can drag and drop UIButtons on the .xib file and establish a link between displayed UIButton in connection inspector and .xib's UIBUtton.
Upvotes: -1
Reputation: 6718
press Ctrl button + drag the your button
to viewController.h then "Insert Outlet and Outlet Collection"
will be appeared. After that you remove your finger on mouse you will get Outlet
box regarding connection. It has connection, Name, Type properties. I think it will be helpful to you.
Upvotes: 4