ios - Load an storyboard (UITableViewController) from ViewController -
i want load storyboard viewcontroller. code looks follows:
- (ibaction)button_action:(id)sender { uistoryboard * sb = [uistoryboard storyboardwithname:@"addreportview" bundle:nil]; addreportviewvc * vc = [sb instantiateviewcontrollerwithidentifier:@"addreportview"]; [self.navigationcontroller pushviewcontroller:vc animated:true]; }
the view pushed not see expected view controller (which uitableviewcontroller) instead see empty gray view controller.
remember in both identifier name , storyboard name, capitalization matters. i've gotten wrong many times...
Comments
Post a Comment