简体   繁体   中英

Xcode 7.2 Asset Catalog Changes

I'd like to ask for help regarding the new changes in Xcode 7.2 assets catalog. I'd like to have an image set for my navigation bar. There's now a width and height options panel for a set of images in Xcode 7.2 in the Attributes inspector. I've set my width to Any & Compact which I guess is for a portrait orientation only. Will I set my height also to Any & Regular for a portrait orientation? Am I doing it wrong? Is there other settings to consider for using an image as a navigation bar?

For reference, my @2x is set to 640x192px for iPhone 5s while my @3x is set to 1242x192px for iPhone 6s Plus. I know that for iPhone 6s, my image should be 750x192px but where will I set that in the assets catalog?

资产目录中我的标题图像的当前状态

属性检查员

Well. Compact width and Any height is considered portrait for iPhones. You describe Any width and compact height in your post which is landscape mode. I do not have Xcode 7.2 yet but go ahead and change the value of your image to have compact width and Any height.

however, you should only do that if you are planning to have portrait and landscape have different images. If you are gonna use the same image in both situations then I suggest leaving it at any width and any height.

The above is merely speculation. I am making assumptions based on my knowledge of how size classes work in storyboards. I THINK the same logic and reasoning should apply in the new asset catalog.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM