Post

Replies

Boosts

Views

Activity

Reply to UITab view controller not being displayed when tapped from within a UITabGroup
I'm really struggling to use these new APIs in a manner that works properly with iPadOS and switching between the multi-tasking modes. It would be great if there was some example code that demonstrates an app where the visible view controller's state is retain during these layout mode transitions. It seems like there might be some bugs with the new tab bar APIs and iPadOS multi-tasking modes (iOS 18.4), unless I'm not using the APIs correctly? Here's what I've found so far: 1. More controller issues I noticed that when you have enough tabs (5+) to trigger the "more" controller in compact layout, the app will crash when you switch from a child group tab (associated with a managingNavigationController. This is presumably because the underlying implementation is moving the view controller(s) from the managingNavigationController to moreNavigationController. *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Layout requested for visible navigation bar, <UINavigationBar: 0x102022520; frame = (0 24; 375 50); opaque = NO; autoresize = W; gestureRecognizers = <NSArray: 0x600000c536c0>; layer = <CALayer: 0x600000296400>> delegate=0x101820a00, when the top item belongs to a different navigation bar. 2. Compact tab bar "tap to pop navigation controller to root" issues When you tap on your tab group tab button in compact mode twice to trigger it to pop to the root view controller, it shows the "section" view controller for the tab group and then instantly pushes the last selected tab group child's view controller. Also, if you do this and switch back to the regular layout, it selects the first child of tab group (rather than retaining the correct child selection) or selecting first root tab.
Topic: UI Frameworks SubTopic: UIKit
May ’25