ios-UIImage写入相册

 NSData *imagedate=UIImagePNGRepresentation(image);//将相片转化成data,当然再这里和主题无关
 NSLog(@"%d",imagedate.length);//返回的是字节数
 UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:didFinishSavingWithError:contextInfo:), @"liyang");//这个方法的作用是写到相册里面,下面那个是回调方法
- (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo{
    NSLog(@"%@",error);
    NSLog(@"%@",contextInfo);
}
1.这里只记录一些学习笔记 2.这里只记录一些学习心得,如果心得方向有错,请留言 2.这里只记录一些日记(只为提升英语,暂时有点忙,等转行了开始写)
原文地址:https://www.cnblogs.com/liyang31tg/p/3667665.html