简体   繁体   中英

Xcode5 and iOS7 - Getting Started

I recently updated to Xcode5, only to find myself in a totally unfamiliar environment. A lot of the important things I had gotten used in the previous year works differently or just simp[ly don't work at all, starting with the way how I initiate my root viewController in the appDelegate. It used to be something like this:

self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

self.viewController = [[ViewController alloc] init];
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];

With Xcode5 and iOS7, however, this has changed, and I cannot even do the most simplest things. There is simply nothing in the AppDelegate now.

I know it is a very broad question and Sketch Overflow does not like these types of questions, but can someone point me toward a tutorial, or documentation that lists the most important changes in the new Xcode and how to overcome them? I did a search on the Apple Developer website but found nothing. I know it is probably there I am just not finding it.

Sorry for the vague, amateurish question! :(

If you don't want using Storyboard with XCode 5 you can follow my explanation here to remove storyboard and start with an empty project with xib files.

There are many differences with XCode 5 but you'll have mostly interface mainly due to the status bar problems. But you can continue to use iOS 6 and 6 on XCode SDK 5.

You dont need that code in XCode 5, thats old way.

Interface Builder is merged in new tool called Storyboard.

There you pull UINavigationController from toolbox and set its rootViewController by pulling new UIViewController from toolbox.

You perform this merge by holding right ctrl and clicking in a viewcontrller and pulling the pointer to next view controller. This creates a Segue, which is a new tool for handling creation of view controller and pushing it to view controller stack.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM