Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

paddingBottom param is not working properly under iOS #131

Closed
ryaa opened this issue May 8, 2021 · 0 comments
Closed

paddingBottom param is not working properly under iOS #131

ryaa opened this issue May 8, 2021 · 0 comments

Comments

@ryaa
Copy link
Member

ryaa commented May 8, 2021

Describe the bug
paddingBottom param is not working properly on iOS - see this param desc https://github.com/ryaa/camera-preview/tree/master#startoptions

To Reproduce
Steps to reproduce the behaviour:

  1. make sure that the device is in portrait or landscape orientation
  2. start a camera with toBack set to false (or does not set it so that the default value is used) and paddingBottom param set in CameraPreviewOptions on iOS
    Note that the padding is not applied
  3. rotate the device
    Note that the padding is not applied

Note that padding bottom is not applied and the preview takes the entire screen. This commit broke the padding after rotation - see af469a5

See my comment here af469a5#r50558659
Before it used to calculate height but after the change it uses the original height without bottom padding.

Expected behavior
The param must works as advertised in the plugin README

Screenshots
PNG image (1)

Desktop (please complete the following information):

  • OS: MacOS Big Sur 11.2.3

Smartphone (please complete the following information):

  • Device: IPhone 6S Plus
  • OS: iOS 14.5

Additional context
N/A

@ryaa ryaa changed the title paddingBottom param is not working under iOS paddingBottom param is not working properly under iOS May 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant