Hello, I think this is indeed a UIKit bug, it popped out in my app with iOS 18, with no previous warning.
To give you guys some context, I have a UIKit view controller, a master view; it has rightBarButtonItems and leftBarButtonItems. The detail view is a SwiftUI view hosted in a Hosting controller. In my detail controller I am hiding the navigation bar, and I have a custom button that pops the view controller.
WIth iOS 18, if I navigate to the detail and back the app hangs and the crashes. If I remove the leftBarButtonItems from the master, no crash.
I did some debugging, the loop is triggered by the navigation popping, it doesn't matter if I trigger it with a closure a notification etc.
Reading your indications above I made sure I was not reusing the same UIBarButton item in other nav bars; I am not doing that, in fact this is the only section of my app where I set the leftBarButtonItems.
I hope this helps.
Davide
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: