![](/img/trans.png)
[英]How to create a view controller that supports both landscape and portrait, but does not rotate between them (keeps its initial orientation)
[英]How to create image set for both landscape and portrait orientation?
我是iOS編程的新手。 我想在我的應用程序(iPhone,iPad)中為登錄視圖的背景圖像創建圖像集。 我准備了用於縱向和橫向的圖像。 但是我不知道如何設置圖像集。
您應該將assets
用於圖像。 您可以使用針對不同圖像分類的縱向和橫向尺寸。 例如,如果您想為所有iphones
設置圖像,則應選擇compact width and regular height
尺寸類別,然后可以在那里設置所有的肖像圖像。 因此,如果您針對不同的方向使用不同的圖像,則可以按尺寸類別設置圖像。 如果您有通用圖像,則無需將其設置為其他尺寸級別,則可以將其設置為通用圖像。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.