-
-
Notifications
You must be signed in to change notification settings - Fork 210
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
When UIDocumentPickerViewController is displayed and hidden, useSafeAreaFrame returns an incorrect result #506
Comments
What does the frame change to when it’s presented? |
On iPhone 15 Pro, before displaying UIDocumentPickerViewController, useSafeAreaFrame returns {width: 375, height: 812, x: 0, y: 0}, and when UIDocumentPickerViewController is displayed, it returns {y: 44, width: 343, height: 742.7093333333333, x: 16}, But when UIDocumentPickerViewController is hidden, the result is not restored |
Gotta be honest I’m not sure why the frame changes 😅 are the insets correct? |
insets didn't change when the UIDocumentPickerViewController trigger |
This is sort of what I'd expect. Trying to get the frame in real time is quite difficult since iOS doesn't give you a way to do this. I don't particularly like the useSafeAreaFrame API because we can't handle every single case. What are you trying to achieve here? I might be able to give you some alternatives |
Thanks, i modified the code of react-native-safe-area-context locally. And sent this notification when UIDocumentPickerViewController is hidden |
We already check for a few of these cases - like keyboards. If you want to submit a PR, I'm pretty sure we'd be able to merge it |
In iOS systems, when UIDocumentPickerViewController is displayed, useSafeAreaFrame returns the correct result, but when UIDocumentPickerViewController is hidden, the result returned by useSafeAreaFrame is not restored
The text was updated successfully, but these errors were encountered: