0

In iOS 26, the UISplitViewController primary or detail ViewController is displayed in modal mode, which is not correct. How to remove it?

Code for my UISplitViewController subclass:

    override func viewDidLoad() {
        super.viewDidLoad()
      
    }
    
    override var preferredStatusBarStyle: UIStatusBarStyle {
        get {
            .darkContent
        }
    }
    
    override var preferredDisplayMode: UISplitViewController.DisplayMode {
        get {
            .oneBesideSecondary
        } 
        set {
        
        }
    }
    
    override var presentsWithGesture: Bool {
        get {
            false
        }
        set {
        
        }
    }

enter image description here

enter image description here

I expect it to work like iOS 18: enter image description here

0

2 Answers 2

1

This is part of the new design of iOS 26. From the human interface guidelines,

A sidebar floats above content without being anchored to the edges of the view.

Also in the "Best Practices" section, it is said that,

Extend content beneath the sidebar. In iOS, iPadOS, and macOS, as with other controls such as toolbars and tab bars, sidebars float above content in the Liquid Glass layer. To reinforce the separation and floating appearance of the sidebar, extend content beneath it either by letting it horizontally scroll or applying a background extension view, which mirrors adjacent content to give the impression of stretching it under the sidebar.

In UIKit, you would do this with a UIBackgroundExtensionView. Check out this WWDC video for more info.

In SwiftUI, you would do this with the backgroundExtensionEffect modifier.

For the content that you don't want to extend into the sidebar (e.g. text), lay them out using the safeAreaLayoutGuide. The sidebar is basically an "unsafe" area on the leading edge.

If you are not ready to adopt the new design yet, set UIDesignRequiresCompatibility to YES in Info.plist, as a temporary solution. This option will be removed in future releases. Consider creating your own implementation of a split view if you really want the old design.

Sign up to request clarification or add additional context in comments.

3 Comments

Thanks for your reply. I'm using UIDesignRequiresCompatibility now and I want to improve my interface for iOS 26. Because of the modal view, my popups in the UISplitViewController are displayed under the primary or detail modal window.
@MikhailS How are these popups implemented? Are you just presenting a VC modally with a .popover style or are you doing your own thing? I think you should ask that as a separate question and show a minimal reproducible example demonstrating how your popups look in iOS 26.
Please note that as of iOS 26.1, if you set the primaryBackgroundSyle to .none then you get the same result as iOS 18. It's only iOS 26.0 that still shows the "floating" look regardless of the setting for primaryBackgroundStyle.
0

Use the UISplitViewController primaryBackgroundStyle and set it to .none to get back the same look as iOS 18. But note that this setting is not honored in iOS 26.0. It has been fixed in iOS 26.1.

The best you can do for iOS 26.0 is to ensure that everything in the supplementary and detail columns makes proper use of constraints by using the safeAreaLayoutGuide.leadingAnchor. This will at least keep the content from showing under the primary column. But there's nothing you can do about nav bars and toolbars from extending behind the primary column.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.