zoukankan      html  css  js  c++  java
  • ios开发载入viewcontroller的几种方式

    Assuming you have storyboard, go to storyboard and give your VC an identifier (inspector), then do:

    UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
    UIViewController *vc = [storyboard instantiateViewControllerWithIdentifier:@"IDENTIFIER"];
    [self.navigationController pushViewController:vc animated:YES];

    Assuming you have a xib file you want to do:

    UIViewController *vc = [[UIViewController alloc] initWithNibName:@"NIBNAME" bundle:nil];
    [self.navigationController pushViewController:vc animated:YES];

    Without a xib file:

    UIViewController *vc = [[UIViewController alloc] init];
    [self.navigationController pushViewController:vc animated:YES];
  • 相关阅读:
    HTML音频/视频DOM 参考手册
    HTML5 应用程序缓存 和 视频
    HTML 5 新的Input类型
    快速开发平台消息通知中心之短信发送
    设计模式之单例设计模式
    反射
    多线程之线程安全
    01-sql优化及索引
    多线程之线程状态
    shell/linux定时清理日志文件
  • 原文地址:https://www.cnblogs.com/neozhu/p/2800699.html
Copyright © 2011-2022 走看看