I had this problem a while back, Rolf found the issue for me, I was using a tab controller and one of my root controllers off the tab controller did not override the right stuff, so in essence you must override all the right methods/events on all root controllers for it to work.
ATB Alex On 30 Oct 2012, at 18:43, Brett Spurrier <brett.spurr...@gmail.com> wrote: > I'm having the exact same issue, and I am having the worst time solving it. > In my AppDelegate class, I have the code: > > public override UIInterfaceOrientationMask > GetSupportedInterfaceOrientations (UIApplication application, UIWindow > forWindow) { > return UIInterfaceOrientationMask.All; > } > > And in each of my view controller classes, I have the code: > public override bool ShouldAutorotate() { > return true; > } > > public override UIInterfaceOrientationMask > GetSupportedInterfaceOrientations (UIApplication application, UIWindow > forWindow) { > return UIInterfaceOrientationMask.Portrait; > } > > > I've placed a breakpoint at each of my ShouldAutorotate and > GetSupportedInterfaceOrientations methods, and they never seem to hit. > > I am trying to make it so that certain ViewController classes have > portrait views only. > > What am I missing here? > > Cheers, > Brett > > > > > On Thu, Sep 27, 2012 at 7:37 AM, Rolf Bjarne Kvinge <r...@xamarin.com> wrote: >> >> Hi, >> >> If you zip up your project I can have a quick look to see if there is >> something strange somewhere. >> >> Rolf >> >> On Thu, Sep 27, 2012 at 1:30 PM, Alex White <alexwhit...@gmail.com> wrote: >>> >>> Hi >>> >>> Yes that works, I have gone right through the plist.info file to see if >>> there are any major differences between the new and old project and I >>> cannot see anything. >>> >>> I think something bad has happened to my project as I was not able to debug >>> on the device until I wrote the small demo project to test this problem now >>> I can debug with both the new and the old project, very odd. >>> >>> I can't face creating a new project and copying all the stuff from the old >>> one as I have already done this a couple of times and there is always >>> something missed introducing new bugs. >>> >>> I don't know what to try next. >>> >>> ATB >>> >>> Alex >>> >>> On 26 Sep 2012, at 23:10, Rolf Bjarne Kvinge <r...@xamarin.com> wrote: >>> >>> Hi, >>> >>> On Wed, Sep 26, 2012 at 2:51 PM, Alex White <alexwhit...@gmail.com> wrote: >>>> >>>> Hi Rolf, >>>> >>>> thanks for the reply, I now have >>>> >>>> public override UIInterfaceOrientationMask >>>> GetSupportedInterfaceOrientations (UIApplication application, UIWindow >>>> forWindow) >>>> { >>>> return UIInterfaceOrientationMask.All; >>>> } >>>> >>>> in the AppDelegate class >>>> >>>> I have >>>> >>>> public override bool ShouldAutorotate() >>>> { >>>> return true; >>>> } >>>> >>>> >>>> in my view controller, I also have at the in project settings all >>>> rotations selected for both the iPhone and the iPad. The simulator rotates >>>> perfectly but the iPad does not, all other apps rotate fine on the iPad. >>> >>> >>> Can you make a new project from a template rotate on the iPad? >>> >>> Rolf >>> >>>> >>>> >>>> I must be missing something else. >>>> >>>> thanks >>>> >>>> Alex >>>> >>>> >>>> >>>> >>>> >>>> On 26 Sep 2012, at 10:52, Rolf Bjarne Kvinge <r...@xamarin.com> wrote: >>>> >>>> Hi, >>>> >>>> You need to override GetSupportedInterfaceOrientations in your AppDelegate >>>> class. >>>> >>>> Rolf >>>> >>>> On Wed, Sep 26, 2012 at 7:13 AM, Alex White <alexwhit...@gmail.com> wrote: >>>>> >>>>> Hi Rolf, >>>>> >>>>> if I key the following lines into a view controller >>>>> >>>>> public override bool ShouldAutorotate() >>>>> { >>>>> return true; >>>>> } >>>>> >>>>> public override UIInterfaceOrientationMask >>>>> SupportedInterfaceOrientations() >>>>> { >>>>> return UIInterfaceOrientationMask.All; >>>>> >>>>> } >>>>> >>>>> If you cannot see the image below it says >>>>> 'WizPr.rootBikeListiPad.SupportedInterfaceOrientations()' is marked as an >>>>> override but no suitable method is found to override. >>>>> >>>>> I have read a number of conflicting documents about if I need to subclass >>>>> the navigationcontroller or not, a good example of the IOS6 way of >>>>> rotating would be really helpful. >>>>> >>>>> what is odd is even without all this code and the IOS5 equivilent code my >>>>> views rotate in the simulator (the sim is v6.0). >>>>> >>>>> The reason I was drawn to this was I was converting from xib view >>>>> controllers to non xib and for some reason the old rotation method don't >>>>> work at all without the xib. >>>>> >>>>> ATB >>>>> >>>>> Alex >>>>> >>>>> <Screen Shot 2012-09-26 at 06.06.50.png> >>>>> >>>>> On 25 Sep 2012, at 22:11, Rolf Bjarne Kvinge <r...@xamarin.com> wrote: >>>>> >>>>> Hi, >>>>> >>>>> On Tue, Sep 25, 2012 at 1:06 PM, Alex White <alexwhit...@gmail.com> wrote: >>>>>> >>>>>> Hi all, >>>>>> >>>>>> My rotations have stopped working on the iPad they still work on in the >>>>>> simulator. I don't have the rotation lock on and other apps are rotating >>>>>> fine. >>>>>> >>>>>> I have used this blog to try and work out how to do things >>>>>> >>>>>> http://yusinto.blogspot.co.uk/2012/08/ios-6-auto-rotate-and-orientation.html >>>>>> >>>>>> but it has not helped and shows errors when >>>>>> SupportedInterfaceOrientations() >>>>> >>>>> >>>>> Which errors? >>>>> >>>>> Rolf >>>>> >>>>>> >>>>>> >>>>>> is used. >>>>>> >>>>>> So completely lost on how to proceed from here. >>>>>> >>>>>> ATB >>>>>> >>>>>> Alex >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> MonoTouch mailing list >>>>>> MonoTouch@lists.ximian.com >>>>>> http://lists.ximian.com/mailman/listinfo/monotouch >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> >> _______________________________________________ >> MonoTouch mailing list >> MonoTouch@lists.ximian.com >> http://lists.ximian.com/mailman/listinfo/monotouch >> _______________________________________________ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch