Creating a programmatic tab bar with storyboard view controllers?

前端 未结 2 452
忘掉有多难
忘掉有多难 2021-02-03 13:23

I have a tab bar that is created programmatically and I\'m having difficulties initializing a storyboard associated with a view.

I\'m able to load the view successfully

2条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-03 13:38

    Swift 4

    let storyboard = UIStoryboard(name: "Main", bundle: nil)
    settingsViewController = storyboard.instantiateInitialViewController()
    settingsViewController = storyboard.instantiateViewController(withIdentifier: "SettingsViewController")
    

提交回复
热议问题