Questions tagged [uisplitviewcontroller]

The UISplitViewController class is a container view controller that presents a master-detail interface. In a master-detail interface, changes in the primary view controller (the master) drive changes in a secondary view controller (the detail). The two view controllers can be arranged so that they are side-by-side, so that only one at a time is visible, or so that one only partially hides the other.

The UISplitViewController class is a container view controller that manages the presentation of two side-by-side view controllers. You use this class to implement a Master-Detail interface, in which the left-side view controller presents a list of items and the right-side presents details of the selected item. In iOS 8 and later, you can use the UISplitViewController class on all iOS devices; in previous versions of iOS, the class is available only on iPad.

After creating and initializing an instance of this class, you must assign two view controllers to the viewControllers property. The split view controller has no significant interface of its own because its job is to coordinate the presentation of its two child view controllers and to manage the transitions among different orientations.

A split view controller supports the same interface orientations as its currently visible child view controllers. Both view controllers are displayed in landscape orientations but only the detail view controller is displayed in portrait orientations. When transitioning between orientations, the split view controller sends messages to its delegate object to coordinate the display of a popover with the hidden view controller. For more information on the methods of this delegate object, see UISplitViewControllerDelegate Protocol Reference.

2116 questions
12
votes
1 answer

How to suppress the Master-Detail Controller swipe gesture, and recreate its behaviour on iOS 7

By default the UISplitViewController provides a swipe gesture to open the master view in portrait mode. Unfortunately, this gesture opens the master controller even when manipulating sliders on the detail page! I discovered another question on here…
tarmes
  • 15,366
  • 10
  • 53
  • 87
11
votes
1 answer

How to update DetailView using MasterDetail Application Template

I'm new to using the split view for creating iPad applications. When I first create the project just using the standard MasterDetail Application template (Xcode 4.2), it creates a MasterViewController and a DetailViewController. The template has…
5StringRyan
  • 3,604
  • 5
  • 46
  • 69
11
votes
5 answers

UISplitviewcontroller not as a rootview controller

I am building my first iPad application. And one of my requirements is to deal with UISplitviewcontroller and UINavigationController.our proposed view hierarchy is (LoginView) ->UINavigationView(LandingView + CollectionView)->UISplitViewcontroller(…
Nnp
  • 1,813
  • 7
  • 36
  • 62
11
votes
1 answer

Changing Detail's Navigation Bar in UISplitViewController in Portrait mode

I have a UISplitViewController in which MasterViewController and DetailViewController has its own navigation controller. This is my storyboard: When MasterViewController and DetailViewController are both visible (iPhone 6+ Landscape and…
Candost
  • 1,029
  • 1
  • 12
  • 28
11
votes
5 answers

How to make Segue animation Horizontal without UINavigationController?

I am using a UISplitViewController, with a MasterViewController and DetailViewController, without UINavigationControllers. Currenly the segue animation for master->detail, triggered by performSegueWithIdentifier("showDetail", sender: self) consists…
Daniele B
  • 19,801
  • 29
  • 115
  • 173
11
votes
7 answers

Dismissing iPad UIPopoverController when BarButtonItem is pushed while it's open

Using a split view on the iPad, I have the following code: - (void) splitViewController:(UISplitViewController *)svc willHideViewController:(UIViewController *)aViewController withBarButtonItem:(UIBarButtonItem *)barButtonItem…
11
votes
2 answers

Collapsed master/detail UISplitViewController: detecting detail View Controller dismissal?

CIRCUMSTANCES: iPhone 6 Plus, UISplitViewController rotation across horizontally Compact (collapsed) and horizontally Regular (expanded) size classes. PROBLEM: there seems to be no way to detect - in a collapsed UISplitViewController - when a detail…
Gary
  • 815
  • 10
  • 16
10
votes
2 answers

iOS 14 UISplitViewController (sidebar) with triple column sidebar toggle icon behavior

I'm implementing the iOS 14 (iPadOS 14) sidebar (UISplitViewController with TripleColumn) and having strange "sidebar toggle icon" behavior. In iOS 13 I'm using the tab bar with some split views and table views so I need the Triple Column instead of…
benck
  • 2,034
  • 1
  • 22
  • 31
10
votes
1 answer

View presented from master panel of UISplitViewController not rotating when rotated from portrait to landscape (iPad)

I am presenting a modal view and action sheet from master panel of UISplitViewController. iOS 9.3 1) If I present the view when the iPad is in portrait mode and rotate the iPad to landscape, then the screen is not rotating.2) But if I present the…
10
votes
5 answers

How to change detail View in splitViewController programatically in Swift

I'm making an app where I have a key/value in NSUserDefaults which allows the app on start up to detect if this is the first time the app is turned on on the device. If it's the first time, I want the splitVC(which is also the rootVC)'s detail View…
Raymond Moay
  • 321
  • 1
  • 4
  • 16
10
votes
2 answers

Why can I not place Master and Detail view next to each other in UISplitViewController on the first run, but upon rotation it works?

I have a split view controller that has a list of items on the left and a detail view on the right. Relevant code in AppDelegate: let splitViewController = mainView.instantiateViewControllerWithIdentifier("initial") as! UISplitViewController …
Async-
  • 3,140
  • 4
  • 27
  • 49
10
votes
3 answers

Swift: how to detect if UISplitViewController is currently showing 1 or 2 controllers?

How can I detect if the UISplitViewController is currently just showing 1 view controller or it's in dual-pane with 2 views controllers shown side-by-side?
Daniele B
  • 19,801
  • 29
  • 115
  • 173
10
votes
1 answer

UITabBarController inside master of UiSplitViewController

I want to achieve the same flow as Facebook messenger app, with a tab bar controller inside the master view. See Ive done exactly as described in this answer Create a TabBar Controller with a Master-detail template? However! It does not work…
Zeezer
  • 1,503
  • 2
  • 18
  • 33
10
votes
1 answer

UISplitViewController + Split View: hide details at startup

I have a UISplitViewController in an iPad app and until now I was setting a placeholder as the details view controller at startup, so the right part of the screen would not look empty until the user selects an item. But now, on iOS 9, when using a…
PatrickNLT
  • 4,075
  • 1
  • 25
  • 32
10
votes
1 answer

How to set Split View Controller Delegate from Storyboard?

I have dragged out a splitViewController, and identified it as a subclass I have created MySplitViewController. When Right-clicking the splitview storyboard I can see that I've set its Master and Detail view controllers, and furthermore that the…
Alex Turner
  • 247
  • 1
  • 2
  • 12