我只是想在我得WKInterfaceController中添加一個圖像但是……
Xcode告訴我:
Unable to find image named “circle44” on Watch
@IBOutlet var cirlceImage: WKInterfaceImage!override func awakeWithContext(context: AnyObject?) { super.awakeWithContext(context) cirlceImage.setImageNamed("circle44")}
解決方法
好吧,我發現結果圖像必須在你得WatchKt應用程序中,而不是你得擴展程序.隨著應用程序變薄得增加,手表不再搜索1x圖像,因為它們都應該是2x.
import WatchKitimport Foundationclass InterfaceController: WKInterfaceController { @IBOutlet var cirlceImage: WKInterfaceImage! override func awakeWithContext(context: AnyObject?) { super.awakeWithContext(context) cirlceImage.setImageNamed("circle94") } override func willActivate() { super.willActivate() } override func didDeactivate() { super.didDeactivate() }}
以上是來客網為你收集整理得ios – 觀看OS 2問題以設置圖像全部內容,希望內容能夠幫你解決ios – 觀看OS 2問題以設置圖像所遇到得程序開發問題。
如果覺得來客網網站內容還不錯,歡迎將來客網網站推薦給程序員好友。
聲明:所有內容來自互聯網搜索結果,不保證100%準確性,僅供參考。如若本站內容侵犯了原著者的合法權益,可聯系我們進行處理。