-2

I have created an universal application which runs fine on my ipad . But the image sizing for the iphone isnt perfect . I have tried all the view modes .Can anyone help with this issue . I have added all the images with all the different resolutions .

Nikilicious
  • 1
  • 1
  • 10
  • for universal app you have two storyboards one for iPhone Devices and one For iPad devices. do you have this both..? – Nitin Gohel Sep 18 '14 at 07:55
  • Have you supplied images for both iPad and iPhone and the different resolutions as well so your normal ones, `@2x` ones and `@3x` ones? – Popeye Sep 18 '14 at 08:13
  • image.png image@2x.png image-568h@2x.png – Nikilicious Sep 18 '14 at 11:15
  • Now its running fine for 4inch iphone bt 320 480 image is not displayed fully . if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { CGSize result = [[UIScreen mainScreen] bounds].size; if(result.height == 568) { _myimage.image = [UIImage imageNamed:@"darkback-568h.png"]; } else { NSLog(@"hi"); _myimage.image = [UIImage imageNamed:@"darkback.png"]; } – Nikilicious Sep 18 '14 at 11:17

2 Answers2

0

Create two different storyboard/xib for iPhone and i Pad.

You have to check condition for iPhone and i Pad.

if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
{
//for i Pad.
}
else

{
//for iPhone.
}
0

Check under project - Deployment Info if your iPhone and iPad refers to the correct Main interfaces (for iPhone you should have youre iPhone storyboard and for iPad your iPad storyboard). You can find Deployment info here enter image description here

LS_
  • 6,763
  • 9
  • 52
  • 88