Take the 2-minute tour ×

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

share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

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.

share|improve this answer
thanks......... –  nmnir May 16 '12 at 11:31
add comment

You can make UIButtons or any UIControl one of two ways

  1. By Programmatically
  2. By .xib file

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.

share|improve this answer
This does not answer the question. –  Nikolai Ruhe May 16 '12 at 11:17
add comment

Your Answer


