Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create xib based interface with Xcode 5

I am trying to create a new app with Singe View template but there is no xib or storyboard option to make my interface as xib file !!! why does Apple remove xib from iOS 7 ?!! How can I create application with xib interface files ?

enter image description here

like image 637
iOS.Lover Avatar asked Oct 28 '13 10:10

iOS.Lover


3 Answers

  • Create a new project
  • Select Single View Application
  • Set ProjectName and other settings
  • Save Project at location
  • Select Project in Navigator Panel in Left
  • Remove Main.storyboard file from project
  • Add New .xib file in Project
  • Set Main Interface to your .xib file in "General Tab" on right panel.
  • Paste following code in didFinishLaunchingWithOptions method
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.rootViewController = [[UIViewController alloc] initWithNibName:@"YourViewController" bundle:nil];
[self.window makeKeyAndVisible];
like image 164
Rugmangathan Avatar answered Nov 09 '22 14:11

Rugmangathan


Apple removed it because they just want to "force" everybody to use Storyboards, although from what I know, a big amount of people just don't find them useful.

I'm afraid you'll have to do it yourself, just create an empty app and set yourself the view.

Check an example:

http://www.appcoda.com/hello-world-app-using-xcode-5-xib/

like image 39
Antonio MG Avatar answered Nov 09 '22 13:11

Antonio MG


Apple remove it from xcode 5 . you have only one option to choose storyboard. if you want to xibs then remove storyboard after creating singleView application and add xib manually. another option is to create application in xcode 4.6 or earliar version then run it on xcode 5.

like image 20
Mahendra Y Avatar answered Nov 09 '22 13:11

Mahendra Y