nativescript-camera-plus
nativescript-camera-plus copied to clipboard
(iOS - Angular) Camera View is Shifted
I upgraded to 2.1.7 and have an issue with the camera view not displaying properly. It seems like the camera view is being shifted by a value equivalent to however much the root CameraPlus component is offset from the edge of the screen.
I modified the angular example to show what I'm talking about. Simply add style="background-color: rgba(0, 128, 0, 0.392);"
to the <CameraPlus>
tag and add style="background-color:rgba(255, 0, 0, 0.42);"
to the row 2 group of buttons. It produces the image below:
You can see that the camera view is shifted down into the pink row of buttons and the green background is exposed. This happens in landscape mode as well:
In this case not only is it shifted down, but it's also shifted to the right. It seems to possible be caused by the header/safe zones on ios that is the amount they are shifted.
Here's what it looks like on an iPhone 7. The thing to notice here is that the shift is equivalent to the smaller header, and in landscape it isn't shifted horizontally.
If the CameraPlus component appears after something else in the view, it is shifted by the total amount from the edge of screen. In the screenshot below I positioned it below the buttons (pink). It still has the green background, but notice the actual camera view (black) is below the green background it should be within.
@NathanWalker @bradmartin I know we didn't have this problem when we were developing the plugin. But I'm in the process of updating the LiveShopper app to NativeScript 5 for the first time and this is the last piece preventing me from finishing the release. Any help would be much appreciated.
Dear @ShawnPavel Did you have any chance to fix this issue? Did it work well on Android also? I tested it on android but didn't work. My plugin version is 2.1.7. Please let me know
@SweetMei25 Android seems to work well. But I don't know how to fix it. @NathanWalker, @bradmartin, @NathanaelA, or someone with more knowledge will need to take a look at it.
I see. On Android, I was able to make it work well, but I didn't test it on iOS yet and I will need iOS version... so please professionals, kindly help us to fix this issue.
@ShawnPavel, may I see your code?
I provided the code required to reproduce the error above using the demo project supplied within the plugin.