0
我有一個小問題的方法,我已經實現了以下方法 打開圖像:在調用viewDidLoad中()
- (void)ladeImage {
id path = @"http://172.23.1.63:8080/RestfulJava/pics";
NSURL *url = [NSURL URLWithString:path];
NSData *data = [NSData dataWithContentsOfURL:url];
UIImage *img = [[UIImage alloc] initWithData:data];
UIImageView *imgView = [[UIImageView alloc] initWithImage:img];
[self.view addSubview:imgView];
}
但我怎麼能實現在viewDidLoad中這種方法()這個類的方法。 請問有人可以幫我嗎?
哦,是的,這是我搜查的方式! – Marco 2010-09-21 06:40:04
太棒了!你可能想考慮接受答案,那麼:p – Toastor 2010-09-21 07:29:17