Skip to content

Instantly share code, notes, and snippets.

@toshikaz55
Created April 9, 2014 01:33
Show Gist options
  • Save toshikaz55/10217333 to your computer and use it in GitHub Desktop.
Save toshikaz55/10217333 to your computer and use it in GitHub Desktop.
iOSでキャッシュ機能ありなしで画像表示
// キャッシュ機能付き画像表示
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