You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have SwiftMessageSegue called form the same view controller and configured literally by same code.
In one case the startReleaseMonitor() continues restarting itself each 2 seconds until user dismisses the dialog (expected behavior), but in another case it ends up in self.source.view.window being .none and hides everything (unexpectedly).
Adding segue.duration = .forever doesn't help.
The only meaningful difference in code is that the segue works properly in a scenario when it is called as a result of a button tap:
I suppose it might be related to view hierarchy, because in the successful scenario it is opened modally above another modal dialog while in unsuccessful one it is opened modally above a simple view controller (having a usual navigation bar).
Important to note that it worked correctly since 2021. After rolling a few versions back I have figured out it was working fine in 9.0.6 and the issue appeared in 9.0.7.
The text was updated successfully, but these errors were encountered:
vitalii-tym
changed the title
Message opened via SwiftMessagesSegue closes by itself after 2 seconds
Message opened via SwiftMessagesSegue closes by itself after 2 seconds (regression, appeared in 9.0.7)
Mar 20, 2024
The dismiss monitor should only auto-dismiss if the presenting view controller is removed from the view hierarchy without being properly dismissed, such as if you change the app's root view controller. This is by design. Is your presenting view controller being removed? If so, why should the presented view controller remain presented?
Nothing changes in the view hierarchy between the moments when this message is opened and when it closes by itself.
I can see that the monitoring function was added on purpose in 0.9.7. So this could be some kind of hard-to-predict behavior in a specific context or in an edge-case scenario.
I will try to analyze and gather more information about the specifics of the context, in which I'm using this segue. Pls give me some time to analyze further.
Sure. My question for you would be, if nothing is changing, how do you explain the source view not being in a window? Any view that is being displayed must have its window property set.
I have SwiftMessageSegue called form the same view controller and configured literally by same code.
In one case the startReleaseMonitor() continues restarting itself each 2 seconds until user dismisses the dialog (expected behavior), but in another case it ends up in
self.source.view.window
being.none
and hides everything (unexpectedly).Adding
segue.duration = .forever
doesn't help.The only meaningful difference in code is that the segue works properly in a scenario when it is called as a result of a button tap:
While the malfunctioning scenario is when it is called from a function, which in its turn is triggered from a delegate method.
I suppose it might be related to view hierarchy, because in the successful scenario it is opened modally above another modal dialog while in unsuccessful one it is opened modally above a simple view controller (having a usual navigation bar).
Important to note that it worked correctly since 2021. After rolling a few versions back I have figured out it was working fine in 9.0.6 and the issue appeared in 9.0.7.
The text was updated successfully, but these errors were encountered: