My app currently uses a tab bar and I would like to implement a sidebar with a similar hierarchy on iPad.
In the session video, the usage of a protocol is mentioned to set the state between the view controller in the tab bar and the view controller in the sidebar. The practicality however, is a bit unclear to me; why use this strategy instead of moving the view controllers from the tab bar controller to the split view controller? Having more view controllers in memory does not seem like a good idea, especially when the app is in the background.
How do Photos and Music handle this issue considering their hierarchies are similar to their compact width counterparts?
In my testing, I have tried updating the hierarchy using the didCollapse and didExpand delegate methods but this only resulted in the following crash:
Additionally, the following crash may occur:
I also tried setting the tab bar controller for both compact and secondary but this adds a navigation controller to the tab bar controller in compact width.
In the session video, the usage of a protocol is mentioned to set the state between the view controller in the tab bar and the view controller in the sidebar. The practicality however, is a bit unclear to me; why use this strategy instead of moving the view controllers from the tab bar controller to the split view controller? Having more view controllers in memory does not seem like a good idea, especially when the app is in the background.
How do Photos and Music handle this issue considering their hierarchies are similar to their compact width counterparts?
In my testing, I have tried updating the hierarchy using the didCollapse and didExpand delegate methods but this only resulted in the following crash:
Code Block Mutating UISplitViewController is not allowed during a delegate callback.
Additionally, the following crash may occur:
Code Block Unexpected view controller change in Secondary column for expanding
I also tried setting the tab bar controller for both compact and secondary but this adds a navigation controller to the tab bar controller in compact width.