The Xamarin Community Toolkit is a collection of Animations, Behaviors, Converters, and Effects for mobile development with Xamarin.Forms. It simplifies and demonstrates common developer tasks building iOS, Android, and UWP apps with Xamarin.Forms.
MIT License
1.58k
stars
471
forks
source link
[Bug] [iOS] CameraView changes it's size in horizontal orientation #2001
If I make photo and hold device vertical CameraView works correctly.
But if I make photo and hold device horizontal (when device camera looks down) or with some angle, CameraView changes it's own size after opening page where I use it.
Besides, ImageView, which I use for showing preview, also changes it's own size, if I made photo, while device was held horizontal.
If I lock screen orientation using device button, CameraView works correctly.
But locking orientation using Supported device orientations in info.plist and overriding GetSupportedInterfaceOrientations doesn't work.
Stack Trace
Link to Reproduction Sample
Steps to Reproduce
First scenario:
Hold device horizontal
Open page with CameraView.
Expected Behavior
CameraView has declared size.
Actual Behavior
CameraView has lower size than u declared.
Second scenario: (in this case u should use ImageView for showing photo you took)
I used to use Device.Info.ScaledScreenSize.Height for setting CameraView height. It caused resizing. Using App.Instance.MainPage.Height resolves issue.
Description
If I make photo and hold device vertical CameraView works correctly. But if I make photo and hold device horizontal (when device camera looks down) or with some angle, CameraView changes it's own size after opening page where I use it. Besides, ImageView, which I use for showing preview, also changes it's own size, if I made photo, while device was held horizontal.
If I lock screen orientation using device button, CameraView works correctly. But locking orientation using Supported device orientations in info.plist and overriding GetSupportedInterfaceOrientations doesn't work.
Stack Trace
Link to Reproduction Sample
Steps to Reproduce
First scenario:
Expected Behavior
CameraView has declared size.
Actual Behavior
CameraView has lower size than u declared.
Second scenario: (in this case u should use ImageView for showing photo you took)
Expected Behavior
ImageView has declared size.
Actual Behavior
imageView has lower size than u declared.
Basic Information
Reproduction imagery
Code samples (mac zip)
Samples.zip