How can I block horizontal orientation in xamarion IOS?

1

How can I block the horizontal orientation in xamarin IOS. Only that it can be seen vertically.

    
asked by Alcides Salazar 24.12.2016 в 21:01
source

1 answer

1

You can see in the documentation how to do it for iOS with Xamarin, you have to define the property of orientation to your Activity,

either Landscape (horizontal):

ScreenOrientation.Landscape

o Portrait (vertical):

ScreenOrientation.Portrait

Example:

 [Activity (Label = "MyRotatingApp.Droid", Icon = "@drawable/icon", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation,
    ScreenOrientation = ScreenOrientation.Landscape)] //Esto es lo que controla la orientacion.

This is the documentation:

link

    
answered by 24.12.2016 / 22:36
source