iOS 13 UISplitView Problems

后端 未结 8 1250
情话喂你
情话喂你 2021-01-02 14:00

On iOS 13 Beta 5, I currently have problems with my UISplitView on iPhones.

My app starts with the detailsview off my splitview not with my masterview (look at the p

8条回答
  •  温柔的废话
    2021-01-02 14:29

    As many answers here leads to change in the Split View Controller starting sequence, I realized, that on compact size it performs vewDidLoad on detail controller ONLY. But awakeFromNib is called on every controller. So - I've just transfer my code from viewDidLoad to awakeFromNib and everything now is works perfectly!

    override func awakeFromNib() {
        super.awakeFromNib()
    
        if let splitController = splitViewController {
            splitController.delegate = self
        }
    }
    

提交回复
热议问题