Created
April 9, 2014 01:08
-
-
Save toshikaz55/10215823 to your computer and use it in GitHub Desktop.
iOSでWeb上の画像をUIIまげに表示する
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
// URL文字列の生成 | |
NSURL *myURL = [NSURL URLWithString:@"http://www.ymori.com/itest/sample.jpg"]; | |
// 素のデータを作成 | |
NSData *myData = [NSData dataWithContentsOfURL:myURL]; | |
// データを画像に変換 | |
UIImage *myImage = [UIImage imageWithData:myData]; | |
self.myImageView.image = myImage; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment