苹果手表上的图片 [英] Images on apple watch

查看:35
本文介绍了苹果手表上的图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

昨天我的申请被拒绝时遇到了一个问题.显然这些图像没有显示在实际的 Apple Watch 上,但它们显示在模拟器中.我什至尝试重置模拟器,但无法复制苹果员工发生的问题.所以我只是想知道在 Apple Watch 上添加/显示图像的正确方法是什么,这样它们才能在实际的硬设备上正确显示?

I ran into a problem yesterday when my application was rejected. Apparently the images are not being displayed on the actual Apple Watch, however they are being displayed in the simulator. I even tried resetting the simulator and can't replicate the problem that occurred for the apple employee. So I am just wondering what the correct way to add/display images on the apple watch is, such so that they will be displayed properly on the actual hard device?

代码:

.h

@property (strong, nonatomic) IBOutlet WKInterfaceImage *imageHeliLeft;
@property (strong, nonatomic) IBOutlet WKInterfaceImage *imageHeliRight;
@property (strong, nonatomic) IBOutlet WKInterfaceImage *imageHeliCenter;

@property (strong, nonatomic) IBOutlet WKInterfaceImage *imageObsTL;
@property (strong, nonatomic) IBOutlet WKInterfaceImage *imageObsTM;
@property (strong, nonatomic) IBOutlet WKInterfaceImage *imageObsTR;
@property (strong, nonatomic) IBOutlet WKInterfaceImage *imageObsML;
@property (strong, nonatomic) IBOutlet WKInterfaceImage *imageObsMM;
@property (strong, nonatomic) IBOutlet WKInterfaceImage *imageObsMR;
@property (strong, nonatomic) IBOutlet WKInterfaceImage *imageObsBL;
@property (strong, nonatomic) IBOutlet WKInterfaceImage *imageObsBM;
@property (strong, nonatomic) IBOutlet WKInterfaceImage *imageObsBR;

.m当我实际以编程方式设置图像时

.m When I actually set an image programmatically

[self.imageHeliLeft setImageNamed:@"helicopter_1"];

否则我使用界面构建器来设置图像

Other wise I used the interface builder to set the image

推荐答案

如果您在扩展代码中设置图像,您也应该将所有图像添加到扩展目标中.

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

这篇关于苹果手表上的图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆