3

The Problem is, kept size none in the viewcontroller.xib, and wrote code its running in iphone4 ,and normal iphone but the view is not supporting for iphone5 please tell me how to design for all iphone sizes

Unnati
  • 2,421
  • 15
  • 36
Sierra
  • 337
  • 3
  • 15

1 Answers1

0

One important thing we need to keep in mind is you have to place Default-568h@2x.png . Then only it starts supporting for iPhone 5 . You have to write this line for handling the iPhone 5 . iPhone5 screen size is 640x1136 . So the images which you are using for iPhone 4/4s are also suits for iPhone 5 except background images because view height is 176 pixels more in iPhone 5 .

if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone && [UIScreen mainScreen].scale * [UIScreen mainScreen].bounds.size.height>=1136)
    {
    // write some code here for positioning the element 

    }

Let me know if you have any issues

Tendulkar
  • 5,570
  • 2
  • 25
  • 52