0

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! :(

user1799795
  • 279
  • 1
  • 4
  • 11
  • I'm using the same sort of way to set the main window and rootviewcontroller in iOS 7 and it works. So I'm guessing you made some other mistake. – rckoenes Oct 04 '13 at 13:17
  • 1
    Welcome to **Sketch Overflow** :) – Lescai Ionel Oct 04 '13 at 13:17
  • rcKoenes: I believe you. But how came that when you create a new iOS7 application with the new sdk, the appDelegate is basically empty. At least I don't see any rootViewController declaration in it; yet, the app still launches. That, to me, seems like things don't works quite the same way as they used to. – user1799795 Oct 04 '13 at 13:23
  • 1
    [Start Developing iOS Apps Today](https://developer.apple.com/library/ios/referencelibrary/GettingStarted/RoadMapiOS/chapters/Introduction.html) – Abizern Oct 04 '13 at 13:26

2 Answers2

1

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.

Community
  • 1
  • 1
Jordan Montel
  • 8,227
  • 2
  • 35
  • 40
0

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.

Martin Berger
  • 1,639
  • 3
  • 18
  • 39