私はイメージアドレスを含むURLを持っていますが、私はNSThread経由でそのイメージをロードしたいのですが、私は問題に直面しています。私はこのようなことをしています。NSThreadの読み込みイメージにエラーがありますか?
imageView = [[UIImageView alloc] initWithFrame:CGRectMake(20, 10, 55, 57)];
[NSThread detachNewThreadSelector:@selector(showImage) toTarget:self withObject:nil];
[self.view addSubview:imageView];
- (void) showImage {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSURL *url = [NSURL URLWithString:temp.strUrl];
UIImage *chart = [UIImage imageWithData:[NSData dataWithContentsOfURL:url]];
[url release];
imageView.image = chart;
[pool release];
}
私を助けてください。
問題は? –