mirror of
https://github.com/wahyd4/Yep.git
synced 2026-08-22 19:28:54 +10:00
new way to requestImageDataForAsset from quickPickedImageSet
This commit is contained in:
@@ -305,15 +305,24 @@ extension MoreMessageTypesView: UITableViewDataSource, UITableViewDelegate {
|
||||
targetSize = CGSize(width: width, height: height)
|
||||
}
|
||||
|
||||
//println("targetSize: \(targetSize)")
|
||||
|
||||
imageManager.requestImageForAsset(imageAsset, targetSize: targetSize, contentMode: .AspectFill, options: options) { image, info in
|
||||
if let image = image {
|
||||
//println("image.size: \(image.size), scale: \(image.scale)")
|
||||
//println("info: \(info)")
|
||||
images.append(image)
|
||||
println("targetSize: \(targetSize)")
|
||||
|
||||
imageManager.requestImageDataForAsset(imageAsset, options: options, resultHandler: { (data, String, imageOrientation, _) -> Void in
|
||||
if let data = data, image = UIImage(data: data) {
|
||||
if let image = image.resizeToSize(targetSize, withInterpolationQuality: .Medium) {
|
||||
images.append(image)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
// imageManager.requestImageForAsset(imageAsset, targetSize: targetSize, contentMode: .AspectFill, options: options) { image, info in
|
||||
// if let image = image {
|
||||
// //if let image = image?.resizeToSize(targetSize, withInterpolationQuality: .Medium) {
|
||||
// println("image.size: \(image.size), scale: \(image.scale), \(image.imageOrientation.rawValue)")
|
||||
// println("info: \(info)")
|
||||
// images.append(image)
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
for (index, image) in images.enumerate() {
|
||||
|
||||
Reference in New Issue
Block a user