从Storyboard中获取ViewController的实例对象

2016年12月05日 iOS 4条评论 阅读2628次



// 获取storyboard中特定标识的ViewController
// Identity Inspactr中Storyboard ID中输入一个字符串标示
UIStoryboard xxx_storyBoard = [UIStoryboard storyboardWithName:@"storyboardname" bundle:nil];
XXXViewController
vc = [xxx_storyBoard instantiateViewControllerWithIdentifier:@"storyboard_id"];



// 获取storyboard中入口ViewController
UIStoryboard xx_storyBoard = [UIStoryboard storyboardWithName:@"storyboardname" bundle:nil];
XXViewController
vc = [xx_storyBoard instantiateInitialViewController];



分享本文至:

WRITTEN BY

avatar
看了本文是不是觉得很赞,那就赶紧点击下面按钮分享给身边的朋友吧!

4 条评论

  1. avatar warthogrugby

    <a href="http://www.belronctx.com/fake-nobis-cartel-nobisr">fake nobis cartel</a> <a href="http://www.mikeorlandoni.com/under-armour-clutchfit-drive-dam%C3%A4nner-gr%C3%BCn-skod">under armour clutchfit drive dam盲nner gr眉n</a> <a href="http://www.pobert.com/us-polo-assn-scarf-scarfr">us polo assn scarf</a> <a href="http://www.jobmetry.com/new-york-yankees-caps-baby-girl-hatc">new york yankees caps baby girl</a> <a href="http://www.hotellautram.com/new-nike-lebron-skox">new nike lebron</a> <a href="http://www.bonodescuento.com/billig-air-jordan-super-fly-kvinders-lilla-shoesb">billig air jordan super fly kvinders lilla</a>
    warthogrugby http://www.warthogrugby.com/

  2. avatar PDM系统

    学习一下

  3. avatar 大众搬家公司

    学习了 点个赞

  4. avatar 宁波PDM

    讲得很实用啊

欢迎留言




用户登录

sitemap