There are iPhone 6
and iPhone 6 plus
device available from apple.
@2x
and @3x
. When I load image using UIImage imageNamed:
. @3x
ad the end of file? My naming convention is pic.png
, [email protected]
, [email protected]
. iPhone 6
and then [UIImage imageNamed:@"[email protected]"]
or just [UIImage imageNamed:@"pic"]
and the device will automatically use the right image for the right device?Sol: [UIImage imageNamed:@"pic"]
is enough instead of [UIImage imageNamed:@"pic.png"]
.
Reason:
[email protected]
& [email protected]
once you added into you project. [email protected]
or [email protected]
image means device will load pic.png automatically. [UIImage imageNamed:@"pic"]
in your project.[UIImage imageNamed:@"pic"]
is enough.
Suffixes (@2x for iPhone 4 to 6 and @3x for iPhone 6 plus) are added automatically if image with this suffix is found.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With