Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Customising the UIViewController for PageRenderer on iOS 8 to Rotate/Prevent rotation

$
0
0

Hello comrades,

I'm working on a project, which initially had the requirement of being Portrait-only. That was fine, I had simply set it to only support Portrait on iOS project settings. Now the application has a few screens which are meant to be Landscape-only, meaning that I had to re-enable Landscape mode in my application settings.

On my main page (the portrait-only one) I have set ShouldAutorotateToInterfaceOrientation, PreferredInterfaceOrientationForPresentation, GetSupportedInterfaceOrientations and WillRotate to work only with Portrait mode, but it's still rotating to Landscape absolutely fine. Setting ShouldAutorotate to either true or false did not seem to have any effect.

A post on these forums (can't seem to find it at the moment) did recommend creating a custom controller that inherits from UIViewController and editing that, but the controller does not appear to be changeable on a PageRenderer.

Has anyone faced a similar situation? Assistance would be incredibly appreciated.


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>