添加AssetsLibrary.framework然后引入#import 一个获取所有图片的类#import #include @interface ViewController : UIViewController{ ALAssetsLibrary *library; NSArray *i...
分类:
其他好文 时间:
2015-02-09 10:52:25
阅读次数:
194
-(void)addAssetURL:(NSURL*)assetURL toAlbum:(NSString*)albumName withCompletionBlock:(SaveImageCompletion)completionBlock
{
//相册存在标示
__block BOOL albumWasFound = NO;
ALAssetsLibrary *...
分类:
其他好文 时间:
2015-01-29 16:02:39
阅读次数:
116
1.ALAssetsLibrary 实例为我们提供了获取相册(照片app)中的图片和视频的功能。在ios8 photos framework代替了ALAssetsLibrary。
在使用ALAssetsLibrary时,我们需要申明它的实例。
ALAssetsLibrary* library = [[ALAssetsLibrary alloc] init];
2. 迭代获取相册ALA...
分类:
移动开发 时间:
2015-01-15 00:34:45
阅读次数:
231
获取ios相册图片文件大小,很多人,想到的就是取到文件图片的位置,然后通过NSdata来获取图片大小,殊不知,这样获取到的图片大小并非准确。正确的方法应是在代理中实现ALAssetsLibrary* alLibrary = [[ALAssetsLibrary alloc] init]; [alLi....
分类:
移动开发 时间:
2015-01-12 15:54:05
阅读次数:
1342
iOS频繁打开相册崩溃: ALAssetsLibrary error - “Too many contexts. No space in contextList.”http://stackoverflow.com/questions/13480611/has-anyone-experienced-c...
分类:
移动开发 时间:
2015-01-06 11:40:30
阅读次数:
154
# define CELL_PHOTO_IDENTIFIER @"photoLibraryCell"# define CLOSE_PHOTO_IMAGE @"close"# define ADD_PHONE_IMAGE @"photo"- (ALAssetsLibrary *) defaultAss...
分类:
其他好文 时间:
2014-12-30 09:16:31
阅读次数:
215
转载自 http://www.cnblogs.com/javawebsoa/archive/2013/07/19/3201246.htmlALAssetsgroup--------------------------------------------------------------------...
分类:
其他好文 时间:
2014-12-29 16:45:19
阅读次数:
175
转载自:http://blog.sina.com.cn/s/blog_61235faa0100z3dp.htmlCIImage *saveToSave = [filter outputImage];CGImageRef cgImg = [context createCGImage:saveToSav...
分类:
其他好文 时间:
2014-12-25 12:46:15
阅读次数:
149
ALAssetsLibrary*library=[[ALAssetsLibraryalloc]init];[librarywriteImageToSavedPhotosAlbum:p_w_picpath.CGImageorientation:p_w_picpath.p_w_picpathOrientationcompletionBlock:^(NSURL*asSetUrl,NSError*error){if(error){UIAlertView*alert=[[UIAlertViewalloc]initWit..
分类:
移动开发 时间:
2014-11-28 18:33:52
阅读次数:
167
在QQ群里面看到有人问保存图片到自定义相册的办法:直接上代码:#import #import typedef void(^SaveImageCompletion)(NSError* error);@interface ALAssetsLibrary(CustomPhotoAlbum)-(void)s...
分类:
移动开发 时间:
2014-11-04 22:25:05
阅读次数:
326