我的问题是我怎样才能保存与相册中的textview图像? 我的意思是,当我在图像的仪式,我想将图像保存与TextView的我把它写 Click to see the Image我可以使用textview在相册中保存图像吗?
,这里是我的代码,但不工作
@IBAction func SaveImage(_ sender: Any) {
let imageRepresentation = UIImagePNGRepresentation(cv1image.image!)
let imageData = UIImage(data: imageRepresentation!)
UIImageWriteToSavedPhotosAlbum(imageData!, nil, nil, nil)
let alert = UIAlertController(title: "Completed", message: "Image has been saved!", preferredStyle: .alert)
let action = UIAlertAction(title: "Ok", style: .default, handler: nil)
alert.addAction(action)
self.present(alert, animated: true, completion: nil)
}
它的工作,但文本没有按” t保存 enter image description here
什么意思“不工作”?你能提供任何错误日志或描述更好的行为吗? – araknoid
@araknoid我的意思是在专辑 – faten
不保存在光电保存,但没有文字的看法?或者根本没有被保存的东西? – LoganHenderson