Open UISplitViewController to Master View rather than Detail

前端 未结 7 1186
北海茫月
北海茫月 2020-12-04 13:14

I have a split-view interface with a target iPhone 6 application. On the first launch of the application, it opens to the Detail View; I would like it to open to the Master

7条回答
  •  无人及你
    2020-12-04 14:06

    iOS 14

    I wasn't getting a callback for splitViewController(_:collapseSecondary:onto:) and instead used the following new method.

    func splitViewController(_ svc: UISplitViewController, topColumnForCollapsingToProposedTopColumn proposedTopColumn: UISplitViewController.Column) -> UISplitViewController.Column {
        return .primary
    }
    

提交回复
热议问题