苹果手表上的图像 [英] Images on apple watch
问题描述
昨天我的申请被拒绝时遇到了问题.图像显然没有显示在实际的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屋!