Ios 相册应用程序swift lang,有错误的耦合功能
错误消息“字符串”不能转换为“字符串”Ios 相册应用程序swift lang,有错误的耦合功能,ios,swift,Ios,Swift,错误消息“字符串”不能转换为“字符串” 错误消息:找不到成员“AspectFill” let asset: PHAsset = self.photoAsset[indexPath.item] as! PHAsset PHImageManager.defaultManager().requestImageForAsset(asset, targetSize: PHImageManagerMaximumSize, contentMode: .AspectFill, options:
let asset: PHAsset = self.photoAsset[indexPath.item] as! PHAsset
PHImageManager.defaultManager().requestImageForAsset(asset, targetSize: PHImageManagerMaximumSize, contentMode: .AspectFill, options: nil,
resultHandler: {(result:UIImage!, info:NSDictionary!)in
cell.setThumbnailImage(result)
})
return cell
请提供帮助并感谢您尝试在
resultandler
函数中省略info
的显式类型声明<为我工作
let asset: PHAsset = self.photoAsset[indexPath.item] as! PHAsset
PHImageManager.defaultManager().requestImageForAsset(asset, targetSize: PHImageManagerMaximumSize, contentMode: .AspectFill, options: nil,
resultHandler: {(result:UIImage!, info:NSDictionary!)in
cell.setThumbnailImage(result)
})
return cell