1

I'm doing the following tutorial (this is just one example): http://www.raywenderlich.com/1040/ipad-for-iphone-developers-101-uisplitview-tutorial

I start things off by creating a new project called MathMonsters. Xcode then creates files for both iPad and iPhone (no option of creating only for the iPad). I then go on and create the files for LeftViewController and RightViewController. I then change the relevant attributes from the MainStoryboard_iPad.storyboard by selecting the views and changing the classes they correspond to new ones created above.

I then add:

@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet UISplitViewController *splitViewController;
@property (nonatomic, retain) IBOutlet LeftViewController *leftViewController;
@property (nonatomic, retain) IBOutlet RightViewController *rightViewController;

In the app delegate file. Now it asks me to control drag and connect the outlets. Hard as I try, I cannot find anywhere in the storyboard that I can connect these to. I tried looking at different files, like in LeftViewController.h,RightViewController.h and MathMonstersAppDelegate.h. In this last file I see there are empty circles to the left of each outlet but I'm not able to connect them.

I've started working on apps only after Xcode 4.2 came out and I'm not familiar with the xib tutorials and I'm having a hard time in general to look at the older tutorials and adapt them to the new way of coding. Help is therefore greatly appreciated! If it would help to post other parts of the code, please let me know and I will do so.

Thanks everyone.

1 Answers1

0

First, you must add a storrboard to your project, then assign and identifier to stordyboard ID.

Here is an example you can invoke storyboard through your .xib.

    UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
    YourViewController * yourView = (YourViewController *)[storyboard instantiateViewControllerWithIdentifier:@"identifier ID"];

Hope it helps.