标签:回调 async round nim 完成 div ima self swift
let animation = UIViewAnimation()
animation.animate(view: self.background, fn: {
DispatchQueue.main.async {
self.setCoverImage(coverUrl: coverUrl)
}
print("转场1")
}) {
print("转场完成")
DispatchQueue.global().async {
self.reload(url: url, coverUrl: coverUrl, callFn: callFn)
}
}
上面方式死活不回调成功函数。换用下面方式则成功
DispatchQueue.main.async {
let animation = UIViewAnimation()
animation.animate(view: self.background, fn: {
self.setCoverImage(coverUrl: coverUrl)
print("转场1")
}) {
print("转场完成")
DispatchQueue.global().async {
self.reload(url: url, coverUrl: coverUrl, callFn: callFn)
}
}
}
标签:回调 async round nim 完成 div ima self swift
原文地址:https://www.cnblogs.com/iaoc/p/9945960.html