Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
556 views
in Technique[技术] by (71.8m points)

iphone - 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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
  • 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];

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...