当presentController(withnames:contexts :)执行时,如何显示数组的第二个屏幕


presentController(withNames:["ScreenOne", "ScreenTwo", "ScreenThree"], contexts:nil)

执行上线时,ScreenOne屏幕显示如下:

阵列中的第一页突出显示

执行上线时,我将如何获取第二页出现。即ScreenTwo

我希望第二页出现在

的数组中

如果要显示另一个页面,则需要在所选控制器的awake方法中插入呼叫becomeCurrentPage()

override func awake(withContext context: Any?) {
    super.awake(withContext: context)
    // Do your stuff with the context and determine if it is the controller to display
    if mustBeDisplayed {
        becomeCurrentPage()
    }
}

最新更新