UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

How to create an UISplitViewController with .doubleColumn AND .tripleColumn style ?

Forums > iOS

I am currently trying to implement the following: I have an iPad app with minimum deployment target 14+. The rootViewController is a UISplitViewController. The primary view controller is a simple sidebar navigation with 4 navigation points. Three of them are fine with a .doubleColumn style, but one of them needs to have a .tripleColumn style.

To be more specific, the navigtation point which needs the .tripleColumn style should have a table view as the supplementary view and the secondary view should then be a detail view of a selected cell.

Here is an image what I am trying to accomplish. The blue navigation points on the side should indicate where this layout should be active.

Desired layout: https://imgur.com/a/cleOKSx

I already tried the following: Have a UISplitViewController with .doubeColumn style as the rootViewController and then having a second UISplitViewController as the secondaryView for the specific navigation point but this led to a lot of animation glitches when I hide the primary view of the root split view.

Animation glitch: https://imgur.com/a/b9vdKsf

Is there a default way of implementing something like this or is this use case not supported by UIKit ?

3      

Hacking with Swift is sponsored by RevenueCat

SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.

Learn more here

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.