摘要: 一、线程的使用以向网络请求一张图片为例-(void)downURL:(NSURL *)aURL{ NSData *d = [NSData dataWithContentsOfURL:aURL]; UIImage *img = [UIImage imageWithData:d]; //imgView.image = img; // 切换回主线程执行UI的操作 [imgView performSelectorOnMainThread:@selector(setImage:) withObject:img waitUntilDone:NO];}方法1:系统后台执行[se... 阅读全文
posted @ 2013-11-05 11:46 MingFung_Liu 阅读(206) 评论(0) 推荐(0) 编辑