摘要: -(void)setImageWithURL:(NSURL *) url{ //加载网络图片的时候应该开启一个线程,不然加载的时候会阻塞 [self performSelectorInBackground:@selector(loadData:) withObject:url]; }-(void)loadData:(NSURL *) url{ @autoreleasepool { NSData *data = [NSData dataWithContentsOfURL:url]; UIImage *image = [U... 阅读全文
posted @ 2013-07-02 16:44 xiaoxiaoxigua 阅读(302) 评论(0) 推荐(0)
摘要: 原文地址:[置顶]ios-获取系统相簿里边的所有照片作者:胰诵倭恐背#import-(void)getImgs{dispatch_async(dispatch_get_main_queue(), ^{NSAutoreleasePool*pool = [[NSAutoreleasePoolalloc]init];ALAssetsLibraryAccessFailureBlockfailureblock = ^(NSError*myerror){NSLog(@"相册访问失败=%@", [myerrorlocalizedDescription]);if([myerror.loca 阅读全文
posted @ 2013-07-02 16:35 xiaoxiaoxigua 阅读(183) 评论(0) 推荐(0)
摘要: http://blog.163.com/chester_lp/blog/#m=0 阅读全文
posted @ 2013-07-02 14:42 xiaoxiaoxigua 阅读(134) 评论(0) 推荐(0)