Viewing a problem with OS 2 for image installation

I just want to add an image to my WKInterfaceController, but ...

Xcode tells me:

Cannot find image with name "circle44" on watch

@IBOutlet var cirlceImage: WKInterfaceImage! override func awakeWithContext(context: AnyObject?) { super.awakeWithContext(context) cirlceImage.setImageNamed("circle44") } 
+6
source share
2 answers

Well, I found a result that should be in your WatchKt application not on your extension. And with the addition of an app that drains the clock, it no longer searches for a 1x image, since they should all be 2x. As you can see in the works!

 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() } } 
+7
source

Add images to imagees.xcassets, select Apple Watch, then add 2x there

enter image description here

0
source

All Articles