Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Disable Rotation For the first ViewController

$
0
0

I tried many things to disable rotation for my first view but it always rotates..

I have a login view controller that I dont want to rotate.. But after login, other controllers can be rotated..

I tried these in loginviewcontroller, but didnt work..

public override UIInterfaceOrientation PreferredInterfaceOrientationForPresentation ()
{
      return UIInterfaceOrientation.Portrait;
}

public override bool ShouldAutorotate()
{
     return false;
}

I also followed this

http://shrixamarin.blogspot.in/2014/10/ios-8-restricting-orientation-on-view.html

but i think there is a problem in code such as,

Export ("application:supportedInterfaceOrientationsForWindow:")]

seems wrong..

Any advice?


Viewing all articles
Browse latest Browse all 204402

Trending Articles



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