iOS保存App中的照片到系统相册或自建相册的方法
保存照片到系统相册
保存照片到系统相册这个功能很多社交类的APP都有的,今天我们简单讲解一下,如何将图片保存到系统相册(PhotoAlbum)。
1.创建UIImageView
创建UIImageView是为了将照片展示出来,我们是要把UIImage保存到系统相册(PhotoAlbum):
#defineSCREEN[UIScreenmainScreen].bounds.size
self.image=[UIImageimageNamed:@"iOSDevTip"]; UIImageView*imageView=[[UIImageViewalloc]initWithFrame:CGRectMake((SCREEN.width-300)/2,70,300,150)]; imageView.image=self.image; [self.viewaddSubview:imageView];