Unified Contacts

12 September, 2014

Restricting the Orientation on iPhone & iPad

Sometimes you may want to design the apps that only work in landscape mode, but you have to configure the supported orientation for iPhone and iPad separately.

1. Setting supported orientation for iPhone
- In Navigator, click the folder icon to show the Project navigator. Then click the root of the project.


- In the General tab, Development Info section, check the orientation that your app supports.


 2. Setting supported orientation for iPad
- In Navigator, click the folder icon to show the Project navigator. Then click the root of the project.


- In the Info tab, there is a plist property "Supported interface orientations (iPad)". By default, it has 4 items for all orientations. You can simply delete the unsupported orientation for your app.


Okay, now run and test your app :)



你可能想設計一個app只支援landscape mode, 但需要分開設定iPhone跟iPad支援的方向.
1. 設定iPhone支援方向
- 在Navigator, 點選資料夾圖示以顯示Project navigator. 然後點選project的最底層.


- 在General頁, Development Info區, 勾選你的app所支援的方向.


2. 設定iPad支援方向
- 在Navigator, 點選資料夾圖示以顯示Project navigator. 然後點選project的最底層.


- 在Info頁, 這裡有一個plist的屬性叫"Supported interface orientation (iPad)". 預計, 它有4個關於方向的項目. 你只需把你的app不支援的方向刪除.


Okay, 現在可以測試你的app了 :)

No comments:

Post a Comment