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];
  • 相关阅读:
    mySql基础
    ECSHOP模糊分词搜索和商品列表关键字飘红功能
    smarty在循环的时候计数来显示这是第几次循环的功能
    PHP Warning: 的解决方法
    ECSHOP生成缩略图模糊
    ECSHOP商品描述和文章里不加水印,只在商品图片和商品相册加水印
    ECSHOP_百度收录网址后面有?from=rss
    在ecshop中添加页面,并且实现后台管理
    windows 2003子目录权限丢失及子目录权限无法继承更改的解决方法
    Newtonsoft.Json初探
  • 原文地址:https://www.cnblogs.com/neozhu/p/2800699.html
Copyright © 2011-2022 走看看