LoginSignup
5
5

More than 5 years have passed since last update.

iPhone 5用の画像を自動で読み込む

Posted at
  1. some_image.png
  2. some_image@2x.png
  3. some_image-568h@2x.png

を用意しておけば、

UIImage *someImage = [UIImage imageNamed:@"some_image"];

で、デバイスに応じた1〜3のどれかが読み込まれる!
わけではない。その魔法は、起動画面(Default.png)でのみ適用される。

しかし、それを method swizzling で実現した人がいた:
https://gist.github.com/angelolloqui/3799648

5
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5