Created
April 9, 2014 01:33
-
-
Save toshikaz55/10217333 to your computer and use it in GitHub Desktop.
iOSでキャッシュ機能ありなしで画像表示
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// キャッシュ機能付き画像表示 | |
self.myImageView.image = [UIImage imageNamed:@"sample.jpg"]; | |
// キャッシュ機能なし(メモリ不足対策)画像表示 | |
NSString *imgpath = [[NSBundle mainBundle] pathForResource:@"sample" ofType:@"jpg"]; | |
self.myImageView.image = [UIImage imageWithContentsOfFile:imgpath]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment