Take the 2-minute tour ×

I have created a project without support of storyboards, but later I have added a storyboard. Storyboard work well and i see it's contents when loading app in emulator.

Then I created a view controller (UIViewController), and my problem is I can't bind any control from storyboard to my controller.

So my question is how to connect my controller with storyboard.

Thanks in advance

share|improve this question
add comment

5 Answers

Those exact steps (I am using XCode 4.5 and iOS 6.0 ):

  1. Add new storyboard to the project by File->New->File...->Userinterface->storyboard
  2. Go to project summary and select MainStoryboard and select the storyboard name you just created.
  3. From AppDelegate.m file in method didFinishLaunchingWithOptions, comment everything except last statement which returns YES.

That is all. Now you should see your Initial view as you launch the project.

share|improve this answer
add comment

I've found answer on my own question. It's very simple: I should open storyboard, select view controller (it's visual representation on storyboard), then go to identity inspector and replace class UIViewController to your controller class

share|improve this answer
I have a similar problem that you had. I have an existing project, I started without the storyboard. Now I would like to add a storyboard to my project so I can add images easier and move labels around. Would you mind helping me. So far I added a storyboard and put the view controller on the board. But my viewcontroller class won't show up under the identity inspector –  KRUKUSA Mar 29 at 23:54
add comment

For XCode 6 and iOS8 beta2:

  1. Create a Storyboard file (let's call it Main.storyboard). Pick an iPhone or iPad for device type.
  2. In the blank Main.storyboard file, drag a UIViewController from the object library.
  3. If the storyboard is intended to be used as a universal storyboard, then switch to the File Inspector (in the Utilities section on the right), and check mark "Use Size Classes".
  4. Select the View Controller in the storyboard and switch to the Identity Inspector (in the Utilities section on the right), and type in the "Class" field the name of your View Controller.
  5. Find the file "info.plist" in the "Supporting Files" folder on the left in the Navigator section.
  6. Add a row by clicking on the '+' sign to the right of the "information property list" key.
  7. Select "Main storyboard file base name" key, and type the name of your storyboard file, in the "Value" field (in this case it will be called "Main")
  8. In AppDelegate.m/AppDelegate.swift, in the method/func "application:didFinishLaunchingWithOptions:" remove all code except "return YES" (for Objective-C), or "return true" for Swift.
share|improve this answer
Points 5 to 7 can be avoided by simply selecting the Main.storyboard in the drop down menu in the target's "Deployment Info" Main interface. –  Teo Sartori Jun 25 at 11:54
Agreed. I preferred to provide a bit of a what's happening "under the hood". –  Raz Jun 25 at 14:30
add comment

Have you checked if the controls you want to connect have an corresponding IBOutlet or IBAction in the controller? Then you should be able to connect them as usual.

share|improve this answer
Hm, no... when I creating storyboard project outlets and actions are created when I drug controls to controller. Checking now –  glebreutov Jan 23 '12 at 14:49
When you insert the controls in the code with assistant monitor the connection is build up automatically. When you create the storyboard afterwards and place controls into the storyboard without touching the controller, you should have to do this manually. –  konturgestaltung Jan 23 '12 at 14:52
I have added property of label manually, but with no result :( –  glebreutov Jan 23 '12 at 15:10
add comment
  1. Add Main.storyboard

  2. Add row in Info.plist > Main storyboard file base name:Main

  3. Edit code:

  • (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { //Override point for customization after application launch. return YES; }
share|improve this answer
add comment

Your Answer


