Modal ViewController presenting another viewController won't animate immediately
-
01-07-2022 - |
Question
Yes, I struggled a bit with that title...
Here's what my setup is meant to do:
I push a viewController
(resultViewController
) onto the navigation stack. Immediately (literally in the next line of code) I present another viewController
to the rootViewController
(filterViewController
).
So far, so good, and things work as expected.
The modally presented viewController
contains a tableView
. Selecting a cell is supposed to present another viewController
in the current (filterView) controller.
[self presentViewController:filterDetailsController animated:YES completion:^(void){
}];
This is where things go awry: The above snippets is called at the correct time, but the viewController
does not appear until I perform an additional tap or gesture somewhere in the filterView. This suggest that the stacking of modalView inside modalView somehow messes things up. If I change the animated parameter to NO, the viewController
is presented immediately.
An obvious work-around would be to set animated to NO and perform a manual animation in the completion block. I would however love to see if anyone have come across anything similar and knows how to fix the problem.
No correct solution