Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

blue-lion

macrumors member
Original poster
Jan 26, 2010
50
0
Hi, probably a common problem but..... i cant create outlets in the header file by control dragging. I have the storyboard and the header file on the screen at the same time, and the blue elastic line appears but when i drag it over the header file , nothing happens???

Any one know the most obvious thing to look for??
 
Hi, probably a common problem but..... i cant create outlets in the header file by control dragging. I have the storyboard and the header file on the screen at the same time, and the blue elastic line appears but when i drag it over the header file , nothing happens???

Any one know the most obvious thing to look for??

You have to drag into the header file between the @interface and the @end of your view controller.

IF you want to create an outlet instance variable, drag inside curly braces in the interface.

If you want to create outlet properties or actions, drag outside the curly braces. Note that if you use all properties and no instance variables, you might not even have curly braces inside your interface.

You can also drag into your .m file to create actions and outlets there that don't have entries in your header file.

Code:
@inteface myVC: UIViewController
{
//Drag here to create IBOutlet iVars
}

//Drag here to create IBOutlet properties or actions

@end
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.