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@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?
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)
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.