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
22
votes
2 answers

UISplitViewController always show master view in iPad portrait mode iOS 9

I'm building a universal app using UISplitViewController and targeting iOS 9 and above. The app language is Objective-C. Having started with the Xcode Master/Detail template and set up my views in the standard way, I'm realising that the app will be…
beev
  • 1,197
  • 2
  • 16
  • 33
22
votes
4 answers

UISplitViewController inside tab bar

I have an app which has a login screen and when the user logs in, a tab bar controller is pushed. I currently have some views that would benefit from the fact that apple now allows using the split view controller in all iOS devices, so I was…
Alex Terreaux
  • 1,881
  • 5
  • 23
  • 39
22
votes
5 answers

Adding swipe gesture recognizer to DetailViewContoller

I have simple xcode project just made from "Master-Detail Application" template, for iPad. When device is in Portrait orientation, master view is hidden and when you swipe right on detail view, master view will show up. Now, i want to add right…
darko_5
  • 448
  • 1
  • 4
  • 11
21
votes
11 answers

How to hide & unhide Master View Controller in SplitView Controller

I have created a new split view based project in my XCode 4.2 Then in DetailViewController.m file i have add this method - (BOOL)splitViewController: (UISplitViewController*)svc shouldHideViewController:(UIViewController *)vc…
user930195
  • 432
  • 1
  • 5
  • 19
20
votes
1 answer

New UINavigationBar appearance in detail pane of UISplitViewController in iOS 13

Under iOS 13, if you setup a scrollable root view controller (such as a UITableViewController) in a navigation controller and then put that navigation controller in the detail pane of a UISplitViewController, then the nav bar's background isn't…
rmaddy
  • 314,917
  • 42
  • 532
  • 579
20
votes
3 answers

In UISplitViewController, can't make showDetailViewController:sender: push onto detail navigationController

In iOS 8, view controllers can now call showDetailViewController:sender: to have the system determine the proper view controller to present the detail view controller. In my app, I have a UISplitViewController, which contains two…
20
votes
1 answer

How can I get autolayout to override a UIImageView's intrinsic size?

I'm running into a problem with the autolayout for my detail view in a UISplitViewController. My view hierarchy contains a UIImageView with a decorative element, and the image view's intrinsic size seems to be screwing up the layout of the rest of…
Greg
  • 10,360
  • 6
  • 44
  • 67
19
votes
5 answers

Split view controller must be root view controller

Whenever I try to present a UISplitViewController modally the application crashes. Thus it must allways be the root view controller. Can anyone confirm that?
user309305
  • 323
  • 1
  • 4
  • 11
18
votes
5 answers

UISplitViewController will not correctly collapse at launch on iPad iOS 13

I am transitioning my app to iOS 13, and the UISplitViewController collapses onto the detail view, rather than the master at launch — only on iPad. Also, the back button is not shown - as if it is the root view controller. My app consists of a…
Belacqua2000
  • 301
  • 2
  • 6
18
votes
6 answers

SplitView detail view returns wrong view frame ?

I am using a splitView in iPad app. the detail view has 2 subView in it that draws themselves according to the etail view bounds. the problem is that they always draw themselves in (1024, 768) even when the ipad is in landscape mode. BTW - if i call…
shannoga
  • 19,649
  • 20
  • 104
  • 169
18
votes
13 answers

UISplitViewController: remove divider line

When using UISplitViewController on the iPad there's a black vertical divider line between the root and detail view. Is there any way to remove this line? Thanks
indragie
  • 18,002
  • 16
  • 95
  • 164
17
votes
4 answers

Compiling against 5.1 SDK forces new UIPopoverController "slide in" presentation of popovers -- how to disable?

Compiling my iPad app against the 5.1 SDK (release version) causes UIPopoverController to show itself using the new "slide in" from the left presentation. This completely breaks my popover presentation, which relied on having a "black" style header…
Jeremy Fuller
  • 3,391
  • 1
  • 32
  • 27
17
votes
6 answers

UISplitViewController not showing popup button when launching portrait

I am doing an iPad app based on a UISplitViewController. I have a little problem with the toobar button when my app launched in potrait. The button to show the popover is not displayed. However when I rotate my iPad into landscape and then back to…
rpechayr
  • 1,282
  • 12
  • 27
17
votes
2 answers

CoreData Edit/Overwrite Object

I am playing around with a new project, a split view iPad app using Core Data, and I was wondering, as its fairly clear how to add and remove an item. If I was to say alter this to hold text, then that text be shown in a UITextView, how can I edit…
Josh Kahane
  • 16,765
  • 45
  • 140
  • 253
16
votes
4 answers

Detect when both the master and detail view controller are on screen?

I have implemented a UISplitViewController using a Universal Storyboard in Xcode 6. UISplitViewController is supported on iPhone running iOS 8 now, and by default only one view controller will be on screen at a time. I need to know when both the…
Jordan H
  • 52,571
  • 37
  • 201
  • 351