After recompiling my app using Xcode 10.1 / iOS12 SDKs, I see a number of changes in UINavigationViewController method behavior.
Background: my apps use a UINavigationController to drill down into various view controllers. In some areas, the UI offers the option to not only navigate back to a parent controller or drill down into a child, but offers direct transitions in the "navigation tree". Sample: assume the navigation hierarchy from controller classes A to G is allowed and managed by a UINavigationViewController:
-> A
-> B
-> D
-> E
-> F
-> GNow, with an actual stack of
-> A
-> B
-> Dthe user taps a button to goto G directly. So the target hierarchy is:
-> A
-> F
-> GThis means my app's logic will (pseudo code):
[NC popToViewController:A animated:NO]; // pops controllers D and B without animation
[NC pushViewController:F animated:NO]; // pushes F without animation
[NC pushViewController:G animated:YES]; // pushes G animatedObservations:
Before iOS12, popToViewController and pushViewController updated [NC viewControllers] instantly when disabling animations (animated:NO). With iOS12, these methods seem to queue operations but do not change the stack immediately. While this can be considered an option for animated pops/pushes, it seems to have changed at least for non animated transitions? This can be an undocumented change in behavior, but I see another issue that can be considered a bug: popToViewController: is documented to return an NSArray of controllers popped. Instead, it returns nil / an empty NSArray now. In the above example, [NC popToViewController:A animated:NO] should return [ B, D ], it doesn't.
Questions:
Has anyone insights into this or any link to a discussion addressing it? Do I get anything wrong?
Thanks, Harald