Jake Chasan
Veteran developer
Profile
Posts: 1685
Reg: May 13, 2011
location unknow...
29,650
08/23/12 08:44 PM (13 years ago)

Disable Rotation on iPad

Hi All, How would I disable landscape rotation on an iPad of a BT2.0 app? Thanks, Jake
 
SkullyFox
Apple Fan
Profile
Posts: 169
Reg: Jul 15, 2012
Armidale
12,190
like
08/23/12 09:55 PM (13 years ago)
in your application control panel, under core properties, is an option to disable rotations.
 
MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
like
08/24/12 01:34 AM (13 years ago)
To disable rotation on iphone, use the core properties, to disable on ipad, on Xcode, go to BT_rotatingNavCOntroller.m and BT_rotatingTabBarController.m and where you see if([appdelegate.rootApp.rootDevice isIPad]){ canRotate = TRUE; and replace with: if([appdelegate.rootApp.rootDevice isIPad]){ canRotate = FALSE; Cheers.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
08/24/12 07:56 AM (13 years ago)
It can be done another way in X Code, which is also easy. They have visual that shows what rotation are valid, one set for iPhone, one set for iPad - just point and click on the permitted rotations to enable/disable.
 
MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
like
08/24/12 08:36 AM (13 years ago)
AlanMac have you tested that? I'm under the impression that, that option is only to show in the app store how the app works, I don't think it changes anything in the code.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
08/24/12 09:05 AM (13 years ago)
I have used it to prevent iPad and iPhone rotation on my apps - it definitely works, 100%!
 
MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
like
08/24/12 09:11 AM (13 years ago)
Great tip, thanks.
 

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.