-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
pop(to:_) does not work #51
Comments
Hey @Nathan1258, Hah, I'm super confused because I've just tested your code and it seems to work: Could you show me your |
Hey, @FulcrumOne, I implement the library:
with this config:
I've just realised I was testing on a device on iOS18 - maybe this is the issue? I will be able to test on a iOS17 device later and will update! It seems that |
You read my mind, because I was going to ask if it's on iOS beta by any chance 😅 |
Right, now I'm even more confused. I've just tried my partners iPhone (running iOS 17.5.1) and I get the same behaviour, and I've just created a new project and tried the above code so it's my app. I literally have no idea what it could be as I was troubleshooting for 3 hours yesterday. This is my
|
Think I've found the issue. Given this:
The pop(to:_) does not work when
the functionality works. You're probably wondering why I would do the first version of the code. In my actual app, the first view in my
|
@Nathan1258, Oh, I see. To be more specific, this doesn't work because View1 wasn't pushed onto the stack (only MainTest, View2 and View3 are on the stack). There are several possible solutions to this problem:
So here we have the difficult art of compromises and I think I would choose the first path, because it seems to be a cleaner solution in the long run. |
For the given code:
pop(to:_) does not work. Sometimes it does not pop any view, sometimes it pops to the previous view as if I ran
pop()
. Steps to reproduce are above. Below is a demo of the code above:ScreenRecording_07-21-2024.19-21-16_1.mp4
The text was updated successfully, but these errors were encountered: