Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 4    Views: 77

Dan043
Aspiring developer
Profile
Posts: 30
Reg: Jul 11, 2012
Chicago Area, I...
2,850
01/21/13 07:51 AM (13 years ago)

Rotation?

I am a little bit confused about the rotation settings in the control panel. I do not want my app to rotate because it would negatively affect the design of the app, so I changed the settings on my control panel to "Only large devices allow rotation". Unfortunately, the screen is still rotating when I rotate the device in the the iOS simulator. Any thoughts on this? Thanks!! -Dan
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
01/21/13 08:23 AM (13 years ago)
Uncomment this in yourApp_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; } */
 
Dan043
Aspiring developer
Profile
Posts: 30
Reg: Jul 11, 2012
Chicago Area, I...
2,850
like
01/21/13 08:37 AM (13 years ago)
That did it. Thanks very much for your help!! -Dan
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
01/21/13 09:21 AM (13 years ago)
No problem always happy to help
 
lsills81
Apple Fan
Profile
Posts: 469
Reg: Mar 19, 2012
location unknow...
14,090
like
01/22/13 09:48 AM (13 years ago)
WOW!!! This is really a big help. I uncommented the last line and achieved only the rotation needed. ****However my videos played in QT won't rotate. Any idea on how to allow rotation for this while locking down the orientation of the rest of the app? This is what I did in the BTv1.5 iOS 5.0 //Thanks to the guys at idevdepot.com http://goo.gl/hwrth ~ I added "return UIInterfaceOrientationIsPortrait(interfaceOrientation);" to both the rotatingnavcontroller.m and rotatingtabcontroller.m so it now reads: //should rotate -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { //[BT_debugger showIt:self:[NSString stringWithFormat:@shouldAutorotateToInterfaceOrientation %@, @]]; return UIInterfaceOrientationIsPortrait(interfaceOrientation); //allow / dissallow rotations BOOL canRotate = TRUE; //appDelegate ttrapp_appDelegate *appDelegate = (ttrapp_appDelegate *)[[UIApplication sharedApplication] delegate]; if([appDelegate.rootApp.rootDevice isIPad]){ canRotate = TRUE; }else{ //should we prevent rotations on small devices? if([appDelegate.rootApp.jsonVars objectForKey:@allowRotation]){ if([[appDelegate.rootApp.jsonVars objectForKey:@allowRotation] isEqualToString:@largeDevicesOnly]){ canRotate = FALSE; } } } //can it rotate? if(canRotate){ return YES; }else{ return (interfaceOrientation == UIInterfaceOrientationPortrait); } //we should not get here return YES; Which is now broken in iOS 6 as there is no mention of this in the BT_rotatingNavController.m file... as I can see. Thank you
 

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.