我正在将单个图像转换为 UIImagePNGRepresentation,但我不断收到线程断点让数据 = UIImagePNGRepresentation(tile as!UIImage)!ImageNameList 是一个 nsmutablearray 图像
var imageNameList: [String] {
var imageNameList2:[String] = [] //[NSMutableArray]()
for i in 0...149 {
let imageName = String(format: "pic_%03d", Int(i))
imageNameList2.append(imageName)
}
return imageNameList2
}
let table = PFObject(className: "Cool")
let tilesPF = imageNameList.map({ tile in
let data = UIImagePNGRepresentation(tile)! //cannot convert type string to type uiimage
let file = PFFile(data: data)
let tile = PFObject(className: "RealCool")
tile["tile"] = file
})