Ben G
Ben G

Reputation: 3975

how do i generate view controller code defined in a storyboard

Here's what i'm doing : I'm creating an xcode project using storyboards, defining all my screens by drag'n'dropping view controllers and views, but then I need to actually fill those screens with something.

So, i create uiviewcontroller subclasses files in my project, and fill the class name for every view controller in my storyboard. Then, I need to manually drag'n'drop every view elements into my view controller one by one, to generate properties.

I was wondering whether xcode offered the possibility to simply generate all the uiviewcontroller subclasses directly from the storyboard with all the outlets properties already set.

Upvotes: 0

Views: 2602

Answers (1)

Dinesh Raja
Dinesh Raja

Reputation: 8501

No.You only have to mention outlets and actions for all components which you want to use.If its automatically creates all outlets and properties and you cannot use "code conventions" for your application as you like.Sometimes your labels titles are static and you dont need outlets.so you have to connect each and every component.

http://oleb.net/blog/2011/06/creating-outlets-and-actions-via-drag-and-drop-in-xcode-4/

Upvotes: 1

Related Questions