Чтобы реализовать это, я реализовал обходной путь с UIImageView:
Код: Выделить всё
let imageView = UIImageView()
imageView.kf_setImageWithURL(NSURL(string: cpa.imageName)!, placeholderImage: nil,
optionsInfo: [.Transition(ImageTransition.Fade(1))],
progressBlock: { receivedSize, totalSize in
print("\(receivedSize)/\(totalSize)")
},
completionHandler: { image, error, cacheType, imageURL in
anView!.image = image //anView IS NOT an UIImageView
anView!.frame.size = CGSize(width: 15.0, height: 15.0)
print("Finished")
})
Есть ли в этой библиотеке метод получения только UIImage? Асинхронное и кэшированное
Подробнее здесь: https://stackoverflow.com/questions/352 ... er-library