Post

Replies

Boosts

Views

Activity

Reply to This is an internal UIKit bug. Ignoring unexpected nonmatching counterpart: (null)
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:
Sep ’24
Reply to Xcode export for localization does not generate XLIFF
I will file a bug, but I cannot possibly attach a sample project. I tried to export localization with a vanilla projects, and of course it works as expected. I have 10 targets, some model and manager classes are shared; the bug happen when exporting my main app target, but I don't see how to "reproduce" it in a sample project, we're talking 100s of files here... Do you have any suggestion to narrow the issue down? If I managed to do it it might reproduce the issue in a sample project... I can tell you that the XLOC generation is instant; with my vanilla sample test, although it only contained a single string, it took 10 seconds. So I assume that XLIFF generation is skipped completely... But I get no error. Any debugging tip will be useful. Davide
Jun ’22
Reply to SwiftUI UITableView NSInternalInconsistencyException in M1 simulator
To expand on this, I have another bug, linked again to core data and swift ui. The bug appears only in the M1 simulator. I have an edit screen where I can add or remove "IngredientLine" items to a "Recipe" item. I have implemented swipe to delete. When you delete an item, the table gets messed up, cells are somehow drawn (I see the correct number of cells) but they are empty. If I close this view and open it again, I see that the delete operation was successful. Similarly, if I add an IngredientLine, via a presented sheet, when the sheet is dismissed the view load without any content. I am quite sure I might be doing something in a way that is not the most canonical; but the bugs appear only on the M1 simulator. Anyone else with something similar happening? Cheers, Davide
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’21
Reply to Extra UITabBarButton added to UITabBar
I have found an effective workaround. It's hackish, but hopefully it's just temporary. The tab bar children VC send a notification that triggers a manual cleanup of the tab bar, calling this function on the root VC.  @objc func cleanupBuggyTabBar() {         let numberOfTabs = 4         if tabBar.subviews.count (numberOfTabs + 1) {             for index in (numberOfTabs + 1)..tabBar.subviews.count {                let view = tabBar.subviews[index]                view.removeFromSuperview()             }         }     } I don't like having to traverse the views hierarchy, but at least the UX is smooth. In some instances I have to trigger this function with a minimal delay (0.01 seconds), which I apply to the notification post. Again, not very clean but effective.
Topic: UI Frameworks SubTopic: UIKit Tags:
May ’21