Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get an XIB in iOS 7 S.D.K

I have been using iOS for the past couple of months and what i have been doing is when i Click Single View Application, a default View Controller would appear with an XIB. But with iOS 7, the XIB don't seem to appear, rather the storyboard appears. I have no idea how to work with Storyboard's. I have neither used them in the past nor do i want to use them in the near Future. Do i always need to go ahead with an empty view and then add the relevant ViewController's

Please let me know if i am doing something silly or is it the new iOS 7 default behavior.

I did try to get into more detail's but could not get relevant answers on Google as well.

Thank you.

like image 304
iCodeAtApple Avatar asked Dec 28 '25 01:12

iCodeAtApple


1 Answers

Step 1 Create New Project

Step 2 Select "Single View Application" -> Next

Step 3 Set ProjectName and other settings -> Next

Step 4 Save Project at location -> create

Step 5 Select Project in Navigator Panel in Left

Step 6 "Remove Main.storyboard" file from project

Step 7 "Add New .xib file in Project"

Step 8 Set Main Interface to your .xib file in "General Tab" on right panel. refer screenshot attached

Step 9 Paste following code in didFinishLaunchingWithOptions method

self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
like image 126
Dipen Panchasara Avatar answered Dec 30 '25 15:12

Dipen Panchasara



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!