Push View Controller not showing elements added from storyboard

后端 未结 2 1820
北荒
北荒 2021-01-23 03:56

Okay, so far I\'ve two view controllers in my storyboard. One with \"login\" elements and other as \"User\'s home\" sort of thing. I am intending to do the following : When user

2条回答
  •  攒了一身酷
    2021-01-23 04:52

    In addition to NSPostWhenIdle's suggestion of instantiateViewControllerWithIdentifier, you can also define a segue between the two view controllers (not between the button and the second controller, but between the two view controllers):

    Segue between controllers

    Then give the segue a unique identifier, and then have your IBAction method do a performSegueWithIdentifier. This way your storyboard will continue to visually represent the various relationships between your view controllers.

提交回复
热议问题