从UIImage获取图像路径

时间:2018-06-25 09:18:55

标签: ios swift nsdocumentdirectory

我有带有动态生成的uiimage的代码:

$res=mysqli_query($connection, $query);

我需要在按钮中获取当前显示图像的路径:

for product in self.productObject {
                if product.code != nil{
                    self.imageView1.image = UIImage(contentsOfFile: documentsDir.appendingPathComponent("myfiles").path + "/" + product.code! + ".jpg")
                }
            }

如何获取并保存到“路径”?

0 个答案:

没有答案
相关问题