【发布时间】:2017-09-06 15:56:52
【问题描述】:
图片已加载,但无法为 gif 制作动画
override func draw(_ rect: CGRect) {
let urlpath:String = Bundle.main.path(forResource: "logo", ofType: "gif")!
let url = URL(fileURLWithPath: urlpath)
let data = try? Data(contentsOf: url)
let image:UIImage = UIImage.sd_animatedGIF(with: data)
loaderImage.image = image
}
【问题讨论】:
标签: swift swift3 sdwebimage