This is still an issue with Xcode 16.2 and iOS 18.2.
The UINavigationBarDelegate method navigationBar(_:shouldPop:) is not called as expected when running an app in debug mode / with "debug executable" checked (attached to Xcode). It works as expected and according to documentation only in release builds or when unchecking "debug executable" in Product -> Scheme -> Edit Scheme… -> Run -> Info
This issue causes confusion during development and testing.
Perhaps the accepted answer should not be accepted, since it is still an issue (that it doesn't work according to documentation in debug mode)?
Topic:
Programming Languages
SubTopic:
Swift
Tags: