我刚开始学习iOS开发,我正在阅读一本通用应用程序的教程。 第一步是为Main_iPhone.storyboard和Main_iPad.storyboard设置背景图像。
我在iPhone故事板上拖放了一个图像视图,使用属性检查器将图像设置为: background-menu.png ,我可以在下拉列表中选择图像。
现在转向iPad故事板,尝试做与iPhone故事板相同的程序,除了我在教程中被告知选择背景图像: background-menu~ipad.png ,我似乎无法访问来自:属性检查器 - >图像 - >下拉列表。
在“主”文件夹images我有9个不同的图像,但在图像视图的属性检查器中显示的图像是没有任何后缀的三个图像,如: ~ipad , @2x , @2x~ipad 。
有没有办法让这些图像显示,以便我可以使用它们,或者我做错了什么?
I just started learning iOS developing, and i'm reading along with a tutorial for an universal app. The first step is to set an background image to both the Main_iPhone.storyboardand Main_iPad.storyboard.
I dragged and dropped an image view on the iPhone storyboard, used the attributes inspector to set the image to: background-menu.png, which i was able to choose from in the drop down for images.
Turing to the iPad storybord now, trying to do the same procedure as for the iPhone storyboard except i was told in the tutorial to choose the background image of: background-menu~ipad.png, which i don't seem to have access to from the: attributes inspector -> image -> drop-down-list.
In the "main" folder imagesi have 9 different images, but the ones showing in the attributes inspector for the image views are the three images not having any suffix like: ~ipad, @2x, @2x~ipad.
Is there a way to get these images showing so that i can use them, or am i doing something wrong?
最满意答案
图像名称中的〜符号用于指定“设备特定图像”。 您也可以从属性检查器中为iPad选择“background-menu.png”。 如果您使用iPad模拟器/设备来运行您的示例,iOS运行时将自动选择“background-menu~iPad.png”。
~ symbol in the image name is used to specify "Device Specific Images". You select "background-menu.png" for iPad also from attributes inspector. iOS runtime will automatically pick "background-menu~iPad.png" if you use an iPad simulator/device to run your example.
更多推荐
发布评论