0

I am struggling to remove storyboards from Xcode6, I have tried the following questions :

Xcode 5 without Storyboard and ARC and Xcode 6 - Template without Storyboards

But the output I get by following the above approaches is :

Output in iOS 8 Simulator

I have removed Main.storyboard file, removed entries of launch image and storyboard from info.plist.

I am using Objective-C. How can I adjust the view frame to the whole iPhone screen ?

here is the code I am using in didFinishLaunchingWithOptions

CGRect screenBounds = [[UIScreen mainScreen] bounds];

UIWindow *window = [[UIWindow alloc] initWithFrame:screenBounds];

ViewController *viewController = [[ViewController alloc] init];
[window setRootViewController:viewController];

[window makeKeyAndVisible];

[self setWindow:window];
return YES;
Community
  • 1
  • 1
Vinay Jain
  • 1,653
  • 20
  • 28

1 Answers1

3

put Default-568h@2x to your app bundle with dimension 1136x568. You can assign launch images using xcode catalog assets alternatively.

Nik Yekimov
  • 2,657
  • 2
  • 24
  • 34
  • I haven't tried your solution yet, but can you please explain how is launch image related to rootViewController's window frame – Vinay Jain Sep 15 '14 at 05:54
  • This worked, please explain why is it so ? – Vinay Jain Sep 15 '14 at 05:58
  • 1
    In the image at top, the black part in window and white part is viewcontroller's view. Adding Default-568h@2x in your bundle tells Xcode that your app supports 4inch screen so it adjust views for it. Otherwise it keep your default layout to old 3.7 inch screen size and show black window top and down. – NaXir Sep 15 '14 at 06:05
  • by separate launch images iOS recognizes whether your app is optimised to use new screen of newly released device or not. – Nik Yekimov Sep 15 '14 at 06:06