1

Strange bug i am getting right now : If i am disabling auto-layout in application and trying to handle with launch screen then strange bug is coming :

Step 1 :

  • If i am setting application for iOS-7 and above only for LaunchImage then everything is working fine . But problem is that we can not set LaunchImage screen for iPhone- 6 and iPhone 6 + (In this case 1136 size image will show as splash of iPhone 6 and iPhone 6+)
  • And window size of iPhone 5 and above is showing 320*568 (for iPhone5 . 5s , 6 and 6+) .

Step 2 :

  • If i am enabling application for iOS-8 and above too for LaunchImage and setting splash for iPhone 6 and 6+ too then splash is working fine . But after splash window size will be change now its showing as per device screen size . Due to this all view controller are not showing in whole screen because view controller size is still showing 320*480

can anyone let me know why this strange problem appearing and also relevant solution for this .

Same problem appearing in swift programing too .

Alok
  • 24,880
  • 6
  • 40
  • 67
  • it is not strange at all. Dont have you listened about autoLayout or autoResizing – Nirav Gadhiya Jul 03 '15 at 07:58
  • I know about autolayout and autoresize . But i dont want to use autolayout .So if you have any solution without using autolayout then let me know . – Alok Jul 03 '15 at 08:49

3 Answers3

2

It is not a strange problem. Just set background color of your view in veiwDidLoad like self.view.backgroundcolor = [UIColor redColor]; and you will notice your viewController is using full screen but other controls are not getting resized.

Just use AUTO LAYOUT

Auto Layout is a system that lets you lay out your app’s user interface by creating a mathematical description of the relationships between the elements. You define these relationships in terms of constraints either on individual elements, or between sets of elements. Using Auto Layout, you can create a dynamic and versatile interface that responds appropriately to changes in screen size, device orientation, and localization.

You can check documentation

Here is the best tutorial.

UPDATE :


I WOULD NOT RECOMMEND TO USE AUTO-RESIZING

but still you want to do it without autoLayout, you must use auto-resizing.

YOU HAVE NOT ANY OTHER OPTION.

To user auto resize, use this tutorial : Handling Layout Changes Automatically Using Autoresizing Rules


Hope this will help you....

Nirav Gadhiya
  • 6,342
  • 2
  • 37
  • 76
  • I have checked view controller size and its showing 320*480 for iPhone-6 . And i want to grab this functionality without using Auto- Layout . Same as application is working if i am clicking iOS-7 and above only for LaunchImage . – Alok Jul 03 '15 at 09:03
  • Thanks N J to provide me useful document . But just clarify one thing to me . Why code is working if LaunchImage is available only for iOS 7 and Above only (Not for iOS -8 only ) . Then code is working fine in iPhone-6 and iPhone 6 + . Please let me know again if you are not getting my question . – Alok Jul 03 '15 at 10:29
1

Finally i have found one alternate solution for this problem :

Just add Launch screen for 7.0 and above then your App will run on iPhone 5,5s , 6 and 6+ accordingly .

Launchscreen

Add both LaunchImage for 2x and Retina . enter image description here

Alok
  • 24,880
  • 6
  • 40
  • 67
0

I think are you Forget to adding splash screen Default-568h@2x.png in to your Project and can you check my previous answer

Community
  • 1
  • 1
kirti Chavda
  • 3,029
  • 2
  • 17
  • 29
  • Kirti I Have added splash carefully . Please give me any other solution if you have . – Alok Jul 03 '15 at 10:23