Sunday, November 8, 2026
HomeiOS Developmentios - UISplitViewController all the time reveals the secondary view controller

ios – UISplitViewController all the time reveals the secondary view controller

[ad_1]

I’ve an issue with UISplitViewController which is that this class all the time reveals the main points vc or secondary view controller as a substitute of major. Within the major vc I added

override func viewDidLoad() {
tremendous.viewDidLoad()

splitViewController?.delegate = self

//'allVisible' was deprecated in iOS 14.0: renamed to 'UISplitViewController.DisplayMode.oneBesideSecondary'

splitViewController?.preferredDisplayMode = .oneBesideSecondary

}

func splitViewController(_ splitViewController: UISplitViewController, collapseSecondary secondaryViewController: UIViewController, onto primaryViewController: UIViewController) -> Bool {
    return true
}

however nonetheless once I run the app the main points is seen first!

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments