Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 3    Views: 92

Kaybee
buzztouch Evangelist
Profile
Posts: 659
Reg: Sep 22, 2012
Perth, Australi...
44,690
02/04/13 08:34 AM (12 years ago)

Restricting iPad to Landscape only view ??

Hi There, I have searched the forum for a final answer on how to set an app to only show portrait view. How do I keep my app to only show landscape mode? It is an app used on on iPads... Sorry if I missed a complete answer in the forum. (This app is not for itunes review so not worried about their guidelines). Thanks in advance...
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
02/04/13 08:40 AM (12 years ago)
Yeah search is hard because it only searches the titles. Here is a post that could help you: https://www.buzztouch.com/forum/thread.php?tid=DFE29E2528C346BDFBACD5A
 
Korkut Ata
Aspiring developer
Profile
Posts: 108
Reg: Aug 09, 2011
Luxembourg
11,580
like
02/04/13 09:55 AM (12 years ago)
Uncomment this in appDelegate.m file (remove /* and */) //bitwise OR operator... NSUInteger mask = 0; /* UNCOMMENT THIS TO SUPPORT iOS 6 SCREEN ROTATAIONS mask |= UIInterfaceOrientationMaskPortrait; if(canRotate){ mask |= UIInterfaceOrientationMaskLandscapeLeft; mask |= UIInterfaceOrientationMaskLandscapeRight; mask |= UIInterfaceOrientationMaskPortraitUpsideDown; } */
 
MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
like
02/04/13 11:16 AM (12 years ago)
Yes, this info is correct. This first line tells the app on what orientation it should load, mask |= UIInterfaceOrientationMaskPortrait If you want the app to launch in landscape you have to change it to mask |= UIInterfaceOrientationMaskLandscapeRight; or to mask |= UIInterfaceOrientationMaskPortraitUpsideDown; Plus this, I think you have to change TRUE to FALSE in the code just above this, where it reads, canRotate. Cheers. Miguel
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.