[objective-c]UIImageの作り方

UIImageの作り方

NSString*fn=@"image.png";
UIImage*image1=[UIImage imageNamed:fn];
UIImage*image2=[UIImage imageWithContentsOfFile:[NSString stringWithFormat:@"%@/%@",[[NSBundle mainBundle] bundlePath],fn]];

NSURL*url=[NSURL URLWithString:@"http://yourdomain/image.png"];
NSData*data=[NSData dataWithContentsOfURL:url];
UIImage*image3=[UIImage imageWithData:data];

参考サイト
UIImage Class Reference
http://developer.apple.com/library/ios/#documentation/uikit/reference/UIImage_Class/Reference/Reference.html