Closed alexwhb closed 2 years ago
Hello,
Can you please create a demo project with this issue? Also, could you please try to reproduce it in LNPopupController, using UIKit?
Thanks
@LeoNatan Thanks for your quick response. I will do my best to reproduce in a demo project. I'm not very good with UIKit, but I will give it a shot.
Even a SwiftUI will help me debug it. There are known issues with iOS 16, where SwiftUI views do not calculate the top safe area inset when inside the popup. But UINavigationController
’s view hierarchy should work correctly, as it’s a UIKit view. So I wonder if it’s a UIKit bug.
Good to know. I'll try to have you a good example by tomorrow morning. Appreciate the response.
@LeoNatan here is a link to my repo demoing the issue. I'm using Swift UI for this, but I can give it a shot in UIKit if you'd like. Make sure you are running on iOS 16, and let me know if I can add/change anything to make the demo more extensive. It did show the issue on my emulator, so hopefully this is enough for you to get started. Thanks again for your help.
Also note if you lock the screen when you have the popup view open and unlock it the view issue goes away. This makes me think it's possible this is a bug with iOS.
Looking into this, this is actually caused by a bug I’ve known about in iOS 16 SwiftUI for a while. Looking how to solve this.
@LeoNatan Thank you for looking into this. Let me know if there's anything I can do to help. I will contact Apple about this today, just to make sure they are aware of the bug. Hopefully they can do something in their next iOS update too.
It seems very easy to reproduce in iOS 16:
This is just a very simple example where this reproduces and I’m not sure what to do with it currently. It seems view controllers break safe area management if they are not part of the controller hierarchy, which is not always possible.
I’ve transferred the issue to LNPopupController, where it should be handled.
@LeoNatan Thanks for your further investigation into this. Ya it's honestly strange how blatant this bug seems to be, you'd think Apple would have caught it early on in their beta testing. I reported it to them yesterday incase they, somehow, haven't already encountered this bug. Hopefully that does something and they patch this issue in their next release. 🤞
Also it makes sense that it should be in the LNPopupController project. I'll look for it there. Thanks for letting me know.
Fixed in 2.14.0.
Fixed in 1.4.0 (LNPopupUI)
@LeoNatan you are truly my hero !!!! Thank you so much!!!
I'm experiencing the same issue as here, but only inside the LNPopupUI. I'm doing something a little strange where I have a navigation view inside the LNPopup View, but it has worked for me just fine on iOS 15 and below.
Wondering if anyone has experienced the same issue and has any advice on how to solve.
Here's what it looks like in my app
I also realized another very interesting detail.. if you are in the LNPopup view then lock you screen then come back.. this weird navigation behavior goes away and it works as it did on iOS 15.