如何从图像视图的属性检查器中选择带后缀的图像?(How do i choose an image with a suffix from within attributes inspector for

系统教程 行业动态 更新时间:2024-06-14 16:59:22
如何从图像视图的属性检查器中选择带后缀的图像?(How do i choose an image with a suffix from within attributes inspector for an image view?)

我刚开始学习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.

更多推荐

本文发布于:2023-04-16 19:10:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/dzcp/fd510f30de4abc4cbfde4263c4aaab46.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:图像   后缀   视图   属性   器中

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!