Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
258 views
in Technique[技术] by (71.8m points)

Universal application with Portrait orientation for iPhone and Landscape orientation for iPad

I'm creating a Universal application using Swift. I have used Storyboard and Auto-Layouts. Requirement is of creating a universal application which will support Portrait orientation only for iPhone and Landscape orientation only for iPad.

I have developed UI for iPhone and now I will be starting iPad UI.

Also UI created for iPhone is not same as UI created for iPad, both UI's are quite different.

I'm thinking of to create separate storyboards for iPhone and iPad. Is there any proper way to achieve this?

question from:https://stackoverflow.com/questions/27782224/universal-application-with-portrait-orientation-for-iphone-and-landscape-orienta

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Go to the info.plist file and add an array with key "Supported interface orientations (iPhone)" and add the following values in it:

  1. Portrait (bottom home button)

Similarly, add another array "Supported interface orientations (iPad)" and add the following:

  1. Portrait (bottom home button)
  2. Landscape (left home button)
  3. Landscape (right home button)

See below: enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...