Regarding the issue of navigation bar hierarchy in iOS 18

I have discovered a strange phenomenon about iOS18.1.1. I set a logo as the titleView in my navigationBar, and then when I added a view to the navigationBar and pushed it to another page before popping it back up, I found that the view hierarchy of the navigationBar would change in a very short time. In this short time, the logo would cover the view. I did not find this phenomenon on devices below iOS18.1.1. I would like to know what changes have occurred in iOS18.1.1 that caused the view hierarchy to change during the pop process. I hope someone can help me. Thank you very much

I suspect that iOS 18 may have some upgrades and optimizations for animations, which may result in some changes in the view hierarchy for view push or pop. Unfortunately, I did not get more information from the official documentation.

Specifics about the view hierarchy of the UINavigationBar are undocumented and not to be relied upon. Specifically adding your own subviews directly to the UINavigationBar is unsupported – UIKit manages the navigation bar's view hierarchy in order to ensure correct behavior of the navigation bar, and added subviews that it is not managing may interfere with that in ways that we cannot predict.

There may be supported ways to do what you want, but we'd need to understand what you are trying to implement first.

Regarding the issue of navigation bar hierarchy in iOS 18
 
 
Q