Tab bar and split view controllers together?
Tab bar and split view controllers together?
- Subject: Tab bar and split view controllers together?
- From: Alex Hall <email@hidden>
- Date: Sun, 10 Apr 2016 20:36:16 -0400
Hello list,
I've been gone for a while, partly because of some IB/VoiceOver bugs in some 7.x builds of Xcode. But I'm trying to get back into Apple development on the weekends as I have time.
This weekend I was trying to set up a UI for a project I'm refactoring. I want to use a tab bar to let users choose the section they want to look at, but each tab will be a split view controller. That is, each logical section of the app (except settings) is a master/detail view, with some having extra VCs that will be added as necessary to the given navigation controller.
For instance, say we have Messages and Posts. A message consists of a title, author, and text, and a posts consists of a title, author, text, and comments. Comments for a post are in a separate table view that has no detail component, pushed onto the navigation controller managing the Posts tab. In either tab, a table presents the title and author in its cells, and opening the item by tapping the cell presents the detail view, including the text. Pretty standard, but I want the tabs on the bottom to always be visible, regardless of the view. Tapping a tab should open that tab, restoring it to the view that was up when that tab was last active.
I want the user to be able to tap either tab, and have the last-used view show up. Thus, my immediate thought was to embed the split view controller for messages and the one for Posts inside the tab bar controller, but that isn't possible. I could embed the navigation, master, or detail VCs in the tab bar, and now I'm thinking the navigation controller would be the right choice. What I'm wondering is:
* Am I right that, to facilitate multiple split view controllers, each in a separate tab, I'd embed the navigation controller for the split view in the tab bar? I want the tabs to always be visible, unless the user is editing something with a keyboard visible.
* What's the logic behind not embedding split view controllers? There's obviously a good reason, but I don't know what it is. Perhaps I'm giving the split view controller too much credit, when the actual workhorse is the navigation controller?
I've never used split view controllers, because I only just found out that they'll work on all devices and not just large screen widths. Very handy for universal design, but now I've got to learn about them. To that end, I'm reading more about them, but I hoped to get some input from you all on the subject. Thanks.
--
Have a great day,
Alex Hall
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden