Segue from one storyboard to a different storyboard?

前端 未结 9 1900
孤独总比滥情好
孤独总比滥情好 2020-12-13 18:43

I have too many views on one storyboard which is causing it to run really slow. I have been told that a solution to this issue would be to split the one storyboard into mult

9条回答
  •  抹茶落季
    2020-12-13 19:22

    Swift 3

    let vc = UIStoryboard(name: "StoryboardName", bundle: nil).instantiateViewController(withIdentifier: "ViewControllerIdentifier") as? ExpectedViewControllerClass
    self.show(vc, sender: self)
    

    Where the "StroboardName" is the name of your .storyboardfile. The "ViewControllerIdentifier" is the id of the View in the story board. And "self" is any UIViewController

    In my case, the identifier was "chooseCountryViewController"

提交回复
热议问题