我只想将图像添加到我的 WKInterfaceController 但是......
Xcode 告诉我:
在 Watch 上找不到名为“circle44”的图片
@IBOutlet var cirlceImage: WKInterfaceImage!
override func awakeWithContext(context: AnyObject?) {
super.awakeWithContext(context)
cirlceImage.setImageNamed("circle44")
}
Okay I found the result the image have to be in your WatchKt App not on your Extension. And with the addition of app thinning the watch no longer searches for 1x images as they should all be 2x.
import WatchKit
import Foundation
class 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()
}
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)