Overview
When we dismiss a modal ViewController in a specific situation, the dismiss transition works strangely showing a black bar. You can see the following movie and image.
Screenshot:
Movie: https://user-images.githubusercontent.com/12263798/208803342-5183772c-6d31-45df-b09d-719a3aa117e3.mp4
How to reproduce
I'm not sure of the reason, but we can reproduce it in the following conditions:
- In A→B(push transition)→C(modal transition) ViewController structure, execute in order :
navigationController.popToRootViewControllerin B. (popViewControllerdoes not reproduce.)- dismiss in C.
navigationController.navigationBarisTranslucent = falsenavigationController.setNavigationBarHidden(true)in A, andnavigationController.setNavigationBarHidden(false)in B.
Reproduction project: https://github.com/SShayashiCheckPopToRootAnimation
Environment:
$ /usr/bin/xcodebuild -version
Xcode 14.1
Build version 14B47b
Could you please share any ideas why this animation happen?