Push View Controller not showing elements added from storyboard

后端 未结 2 1818
北荒
北荒 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:44

    Using storyboards you should be using:

    UIViewController *homeView = [self.storyboard instantiateViewControllerWithIdentifier:@"someID"];
    [self presentViewController:homeView animated:YES completion:NULL] ;
    

    Then set the ID to the view controller in storyboard like so:

    enter image description here

    Additionally, if you wish to there is absolutely nothing wrong with designing your UI entirely in code. Personally I prefer it. It gives you much more flexibility than interface builder.

提交回复
热议问题