2011-10-29 72 views

回答

0

這裏的代碼,我在我的應用程序用於從Web服務器獲取的圖像:

//enter your image URL as the string and everything else should work for you 
NSURL *imgURL = [NSURL urlWithString:@"http://www.mysite.com/Images/MyImage.png"]; 
NSData *data = [NSData dataWithContentsOfURL:imgURL]; 
UIImage *image = [UIImage imageWithData:data]; 

detailViewController.iPadView.image = image; 

希望這有助於!

相關問題