少し問題があります。画像を開くために次のメソッドを実装しました。
- (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() メソッドでこのメソッドを実装するにはどうすればよいですか。誰か助けてくれませんか?