cordux icon indicating copy to clipboard operation
cordux copied to clipboard

UIAlertController does not call `didMove(toParentViewController:)`

Open fabb opened this issue 8 years ago • 2 comments

UIAlertController seems to do strange stuff inside, it does not call didMove(toParentViewController:) when showing/dismissing. Any ideas on how to keep the navigation state in sync?

fabb avatar Apr 25 '17 13:04 fabb

For alerts you can use the handler for each button to update the state. So in addition to taking the action that might be confirmed, you would also use store.setRoute at that point.

ianterrell avatar Apr 25 '17 14:04 ianterrell

I'd rather have the class who configures the actions not know about state handling, that would tangle up my factory methods. Maybe I can use viewDidDisappear if I assume nothing gets presented on top of the UIAlertController (which might technically be possible, but not very practical).

fabb avatar Apr 25 '17 14:04 fabb