Images on apple watch

不羁岁月 提交于 2019-11-30 23:04:37

Here is the answer. I cannot disclose why I know this, but this is what you need to do.

  1. Remove all images from your Watch App target.
  2. Added images to an image asset file that is in your Watch App target.
  3. Reference the images by the name in the asset file.

If you can see the images in the simulator and they are not in your Watch App target and they are in an asset file then they will work for the reviewer.

As of Xcode 6.3, iOS 8.3:

Leave off the ".png" part of the image name. It will look strange in the storyboard, showing a blue "?", instead of the image thumbnail, but will work on both the simulator and watch. Same goes for specifying PNGs for Context Menus and programmatically specifying animation.

If you're setting the images in your extension code, you should add all the images to the extension target too.

Verify the filenames are correct and the images are placed in the correct target's asset library.

WatchKit Images

It is recommended that you place image resource files in the bundle of your WatchKit app (not in your WatchKit extension’s bundle). Placing them in the WatchKit app bundle lets you use the setImageNamed: method of this class to specify the animated image. Setting them using that method offers better performance by eliminating the need to transfer the images from the user’s iPhone to the Apple Watch. The other methods for setting an image must wirelessly send the UIImage object or image data that you provide to Apple Watch.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!