Closed keerl closed 3 years ago
@keerl that actually sounds really nice! could you try in landscape before i merge and release this?
Good call, the same issue happens in landscape mode but now with right/left drawers not bottom. The interesting thing is that there are 2 different landscape modes (top of left side and top on right side) and the safe area offset will be different depending on the way the device is being held. I'll have to experiment with this and figure out the best solution.
That turned out to be easier than I thought. The left/right safe area size are the same when in landscape mode which isn't obvious to see visually with a notch on the phone. Anyways, used the left offset value in landscape mode. Let me know if that works for you.
@farfromrefug you good with merging this?
I was just wondering if it would be best to check for device orientation to apply the "right" value. don't think left and right will alwaya be the same
Looks like there is a UIDeviceOrientation.LandscapeLeft
and UIDeviceOrientation.LandscapeRight
so it should be straightforward to check actually. How do I actually get what the orientation value is though?
@keerl ios:
const deviceOrientation = UIDevice.currentDevice.orientation;
okay how does that look? checking the orientation now
seems good !
Attempted to fix this issue: https://github.com/nativescript-community/ui-drawer/issues/9 and updated the Vue demo.
Not sure how proper this fix is.
I created an additional height offset that is
Application.ios.window.safeAreaInsets.bottom
that adds to the height if it is iOS. Also forced rounding up withceil
because if it rounds down you will see a little bit of the view.