Discussion Forums  >  Uncategorized

Replies: 0    Views: 174

Goeshi
Aspiring developer
Profile
Posts: 18
Reg: Nov 01, 2011
Cirencester
180
01/30/12 02:09 AM (14 years ago)

Rotating between landscape views

A while ago I was trying to work out how to allow rotation between landscape views only, without allowing portrait orientations. I've now worked out how to do it so for anyone else interested here's the code i used. It needs to be pasted into BT_rotatingNavController.m and BT_rotatingTabBarController.m. It should be clear what you're pasting over from the comment preceding it. //can it rotate? if(canRotate){ return YES; }else{ return ((interfaceOrientation == UIInterfaceOrientationLandscapeLeft) || (interfaceOrientation == UIInterfaceOrientationLandscapeRight)); } I hope this helps. Goeshi
 

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.