So I'm just trying to create a very simple application for demo purposes here:
- Created a one-view app using storyboards
- Added UIView to storyboard
The following code is added to the following header of my controller:
@property (weak, nonatomic) IBOutlet UIView *myView;
Now I understand that I can associate a UIView with a controller:
- arrange my code so that the header file is next to the storyboard
- holding the Ctrl key and dragging it to a property in the header file
My question is this: can I do without Ctrl-drag? And if so, how?
More specifically, it annoys the need to simultaneously place both my header file and the storyboard on the screen, and there seems to be a way to make this connection without it.
I also understand that I can manually place the view by creating it inside my controller's viewDidLoad function, but I would really like to use the interface constructor to simplify / visualize things.
Edit: Is the answer to my question affected, am I using storyboards or xib / nib files? (I would switch to the one where he works)
source share