0

The new iPhone 5 display has a new aspect ratio and a new resolution (1136 x 640 pixels).

What is required to develop new or transition already existing applications to the new screen size? I have already added the splash screen which works for the 4-inch retina display. But still I am getting the 88 pixel gap in the top and bottom of my application screens.

NOTE: I have enabled AutoLayout. But some of the components in my classes are created by XIB and some of them by writing code in the implementation file.

If I enable Auto layout then how should I resize the objects that are been created programatically Please concentrate on the bold lines and provide a solution to me. My UI is very complex and that's why I am not choosing the two XIB's concept for different screen sizes.

Joe C
  • 3,506
  • 2
  • 21
  • 32
ferry
  • 69
  • 1
  • 5
  • 11
  • it all depends on you how you want to utilize the extra space....I did following changes in my app if you are using the table view, it will already expanded till bottom and more entries will be visible. items at bottom goes down, items at top remain at top, items in the middle remain in the middle but distance between them increases as per space. One more suggestion, Read AutoSizing (Not auto layouts) very carefully, it will help a lot in iPhone 5. – AsifHabib Feb 07 '13 at 11:47

2 Answers2

0

If you enable Auto Layout, then for the views that you create in code - you might add NSLayoutConstraints to them (then be sure to set -translatesAutoresizingMaskIntoConstraints to NO).

Mikk Rätsep
  • 512
  • 7
  • 20
  • To control the orientation changes for it also, then I'd suggest you to check out [UIViewController's](http://developer.apple.com/library/ios/#documentation/uikit/reference/UIViewController_Class/Reference/Reference.html) **Configuring the View Rotation Settings** and **Responding to View Rotation Events** sections. – Mikk Rätsep Feb 11 '13 at 07:45
0

if ([UIScreen mainScreen].bounds.size.height >= 568) { // rotationView.frame = CGRectMake(0, 0, rotationViewWidth, rotationViewHeight+88); }

add this code to your code under where you want to match the new iPhone5 aspect,then rotationView is need to modify . rotationViewHeight add 88,and y modified similar

Controller : AViewController *aViewContrller = [[AViewController alloc] initWithNibName:(iPhone5?@"AViewController-5":@"AViewController") bundle:nil];

myyue214
  • 1
  • 2