Closed arjun159 closed 7 years ago
Could you please clarify for Android / iOS / UWP?
I see this too, on iOS
Do you use the code for iOS Specific Support? https://github.com/wcoder/Xamarin.Plugin.DeviceOrientation#ios-specific-support
I don't have a ViewController in Xamarin.Forms on iOS.
I'm trying like this in my code-behind of my xaml page:
public partial class MyLockedPage : ContentPage
{
public MyLockedPage ()
{
InitializeComponent();
CrossDeviceOrientation.Current.LockOrientation(Plugin.DeviceOrientation.Abstractions.DeviceOrientations.Portrait);
}
}
Ok, I will check and report results in the near time.
@arjun159, @gmwilhelm please check version 1.0.5.
For Xamarin.Forms iOS look at this: https://github.com/wcoder/Xamarin.Plugin.DeviceOrientation#xamarinforms-ios
Thanks, works for me
For me on iOS I had to manually edit the Info.plist as the Manifest editor was not updating it correctly See below for locking iphone and ipad to portrait
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
Thanks @darrenmcgrath the info.plist solution worked very good.
we are facing a weird issue with xamarin forms ios orientation.
while implementing the xamarin community toolkit we are facing the orientation issue in ios.
In android, it is working fine but in ios the tool kit tab view is messed up.
Any solution?
@ravi-simrun could you please provide more info?
ya sure please find the attached screenshots Xamarin.Forms version 5.0.0.2196 Xamarin community toolkit version [1.3.1]
@ravi-simrun thanks for the details could you please describe the issue? (screenshots are not so clear) code samples?
When using the lockorientation to portrait in xamarin forms even then the screen is rotating to the landscape mode.