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