ios开发--storyboard里不用拖线方式来push视图

来源:互联网 发布:汽车网站模板源码 编辑:程序博客网 时间:2024/05/22 14:36
ios开发--storyboard里不用拖线方式来push视图
    

    UIStoryboard *sb = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
    NextViewController *nextVC= [sb instantiateViewControllerWithIdentifier:@“NextViewControllerId"];
    [self.navigationController pushViewController:nextVC animated:YES];

    **@"Main":storyboard的名字在Info.plist中的Main storyboard file base name可见

    **@“NextViewControllerId":如图所示红框位置


0 0