Using Multiple Detail Views with Split View Controller
As you know, a
UISplitViewController has one root controller and one detail view controller only, but I want to use another detail view controller.
When I select the list items from the root controller (popover controller), the selection should fire different detail views — i.e., row1 fires detail view1, row2 fires detail view2 and a button item fires detail view3, etc.
How can I achieve this?
- Hiding the master view controller with UISplitViewController in iOS8
- Split view controller must be root view controller
- UISplitViewController within UITabbarController Swift
- iOS - Split View Controller - How do I get a pointer (reference) to the Detail View Controller from inside the Master View Controller?
- How to create a segue from UIViewController to a UISplitViewController
- IOS8 SplitVC + TabBarController + NavigationController
2 Solutions Collect From Internet About “Using Multiple Detail Views with Split View Controller”
There’s a project from Apple that covers exactly what you need. MultipleDetailViews
This sample shows how you can use UISplitViewController to manage
multiple detail views.
The application uses a split view controller with a table view
controller as the root view controller. When you make a selection in
the table view, a new view controller is created and set as the split
view controller’s second view controller.
The root view controller defines a protocol
(SubstitutableDetailViewController) that detail view controllers must
adopt. The protocol specifies methods to hide and show the bar button
item controlling the popover.
That project from Apple is from 2012 and doesn’t use storyboards. If you are looking for a non-storyboarded solution, it will work fine but in Xcode 6 you should be taking advantage of the new Show Detail segue in storyboards.
Here’s a quick example project that shows how to use multiple detail view controllers on the same split view by using the Show Detail segue from the Master View Controller.
- How to efficient insert and fetch UUID in Core Data
- Passing Parameters to Selector action
- Read data through iPhone audio jack
- Pass data between ViewController and ContainerViewController
- “Thread 1: stopped at breakpoint” error when initializing an NSURL object
- Proper Way to Iterate and Load Images from Array into CollectionViewController in Swift
- Swift Initialize Struct with optional stored properties
- Performance difference between dot notation versus method call in Objective-C
- Swift Constraints in Subclass
- iPhone: add entry to /etc/hosts without jailbreaking
- NSUserDefaultsDidChangeNotification and Today Extensions
- Is it better to write 0.0, 0.0f or .0f instead of simple 0 for supposed float or double values
- UILabel stops animations
- application loader stuck at the stage of “Authenticating with the iTunes Store”
- How to get images from Custom album of Photos, iOS SDK?