简体   繁体   中英

Creating icons and images for an iOS application with points vs pixels

I have an icon area that I used an UIImageView to display it. If the imageview has the following frame:

CGRectMake(0, 0, 20, 20)

How big (in pixels) do I make my icon for all the different iPhone display types? I know I need x.png, 2x.png and 3x.png and want them to look good in iPhone 5, 6 and 6 plus.

iOS uses points instead of pixels. So, when you create a 20x20(points) image, it is actually 20x20 pixels for regular iPhone screens where 1px = 1point. For @2x, it is like 40x40 pixels and for @3x it is like 60x60 pixels. This sizes should be sufficient to make them look good basically, as far as I know.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM