标签:
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ });
dispatch_async(dispatch_get_main_queue(), ^(void) { [yourTableView reloadData]; });
__weak XxxViewController *weakSelf = self;
UIImage *imag1 = [UIImage imageNamed:@"image.png"];
//方法2 这种加载方式由于我们将它释放掉了,会再次加载。 UIImage *image2 = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"image.png" ofType:nil]]; //方法3 NSData *imageData = [NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"image.png" ofType:nil]]; UIImage *image3 = [UIImage imageWithData:imageData]; UIImage *image=[UIImage imageWithContentsOfFile:@"file://doucment/image.png"];
标签:
原文地址:http://www.cnblogs.com/hl666/p/4346652.html