LVanswer
  1. UIGraphicsBeginImageContext(self.view.bounds.size);     //currentView 当前的view  创建一个基于位图的图形上下文并指定大小为  
  2. [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];//renderInContext呈现接受者及其子范围到指定的上下文  
  3. UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();//返回一个基于当前图形上下文的图片     
  4. UIGraphicsEndImageContext();//移除栈顶的基于当前位图的图形上下文    
  5. UIImageWriteToSavedPhotosAlbum(viewImage, nil, nil, nil);//然后将该图片保存到图片图 
  6. //self.view.layer 这个自己也可以更具实际需要改view
  7. 例如:

分类:

技术点:

相关文章:

  • 2021-08-01
  • 2022-02-09
  • 2022-02-09
  • 2022-12-23
  • 2022-12-23
  • 2021-08-10
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-05-15
  • 2022-12-23
  • 2022-02-09
  • 2022-12-23
  • 2022-02-09
  • 2021-12-12
相关资源
相似解决方案