0

I am developing an app in which i am displaying certain images such as delete icon,search icon.I have images by names are

  • delete.png

  • delete@2x.png

  • delete@3x.png

    I have created images.xcassets & added the images in that for 1x,2x & 3x. Now i have added an UIImageView on story board & it's default image is delete.png(32*32) it runs fine on 3.5 inch screen but images does not scale on 4.7 & 5.5 inch screen iPhone. Can some one please help me out.What to & how to do it?

Community
  • 1
  • 1
TechChain
  • 8,404
  • 29
  • 103
  • 228

1 Answers1

1

I thick @Banning and @Fatti Khan suggestion will be the solution of the problem. Instead of using image name as delete.png use just delete as a ratio set the images with the exact size as example if the 1x image is 30 px then 2x must be 60px and 3x 90px

1x images are for the original iPhone through the 3GS - 'standard' resolution devices (3.5" screens)

2x images are for the iPhone 4, 4S (3.5" Retina screens) and also iPhone 6.

Retina 4 2x are for the iPhone 5 and 5s (4" Retina screens)

3x images are for the new iPhone 6+ (5.5" super-Retina [3x] screen)

enter image description here

EDIT: please clean your project and then check again (cmd+shift+k) of delete your derived data. also check your view is autolayout enable or disable.

or

add The launch image Default-568h@2x.png as i thought your Code unable to detect the different type of screens it have,so follow this steps

  1. First I would like to suggest that,
  2. Preapre all Images,
  3. Select Project from Project Navigator And Go to Summary and scroll down this screen appears, then right click on that and choose file from your computer it will automatically copied to project and it will entered in plist file also..
  4. if your application is universal then you have to set for iPhone and iPad Both. enter image description here
9to5ios
  • 5,319
  • 2
  • 37
  • 65
  • please check the Edit answer and try it,is it working? – 9to5ios Jun 12 '15 at 06:18
  • I am using xcode 6.I don't have any option of summary.I have copied all images to a group in xcode then i have drag & drop the images to images.xcassets. – TechChain Jun 12 '15 at 06:26
  • just check whether your code able to check the screensize with different screens or not ? check using screenbound condition. – 9to5ios Jun 12 '15 at 06:43