1
我已經更新到與iOS 8.1 SDK的Xcode的最後一個版本,我得到我的函數的錯誤離子聲明:如何在Swift中動畫圖像?
@IBOutlet weak var imageAnimation: UIImageView!
imageAnimation.animationImages = [
UIImage(named: "5.png"),
UIImage(named: "4.png"),
UIImage(named: "3.png"),
UIImage(named: "2.png"),
UIImage(named: "1.png")
]
的錯誤是:「類型的UIImage?不符合協議'AnyObject'
如何動畫圖像?
謝謝!
不再!你會在錯誤信息中看到尾隨問號「UIImage?」嗎?這表明一個*可選*必須解開... – 2014-10-27 09:50:56
或這一個:http://stackoverflow.com/questions/26442059/could-not-find-an-overload-for-init-that-accepts-the -wpplied-arguments-in-swi – 2014-10-27 09:55:05
將解決你的問題http://stackoverflow.com/questions/26511448/could-not-find-overload-for-init-uiimage – leedream 2015-02-25 10:24:22