从Storyboard中获取ViewController的实例对象

2016年12月05日 iOS 9条评论 阅读5389次



// 获取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
看了本文是不是觉得很赞,那就赶紧点击下面按钮分享给身边的朋友吧!

9 条评论

  1. avatar madebyflame

    <a href="http://www.randygageteam.com/nike-lebron-soldier-10-sort-camo-skoi">nike lebron soldier 10 sort camo</a> <a href="http://www.newlouisbag.com/adidas-boost-tout-rouge-chaussuresh">adidas boost tout rouge</a> <a href="http://www.thebrandiac.com/vintage-orlando-magic-hat-hatl">vintage orlando magic hat</a> <a href="http://www.isisprojectsa.com/nike-free-run-5-blanc-chaussuresh">nike free run 5 blanc</a> <a href="http://www.linnwoodpark.com/mizuno-wave-rider-18-p%C3%BArpura-zapatosk">mizuno wave rider 18 p煤rpura</a> <a href="http://www.perfecthostia.com/adidas-zx-flux-blue-and-white-shoesj">adidas zx flux blue and white</a>
    madebyflame http://www.madebyflame.com/

  2. avatar highbacklink

    <a href="http://www.hinogi.com/nike-free-inneva-woven-mine-grigio-scarpel">nike free inneva woven mine grigio</a> <a href="http://www.prontosignsus.com/womens-asics-gel-noosa-tri-7-white-purple-shoesj">womens asics gel noosa tri 7 white purple</a> <a href="http://www.ticahome.com/kvinders-air-max-90-hyperfuse-alle-bl%C3%A5-skok">kvinders air max 90 hyperfuse alle bl氓</a> <a href="http://www.prformusic.com/nike-kobe-10-elite-svart-gr%C3%B8nn-obuvp">nike kobe 10 elite svart gr酶nn</a> <a href="http://www.tatilblogu.com/nike-air-max-tailwind-8-womens-yellow-orange-shoesi">nike air max tailwind 8 womens yellow orange</a> <a href="http://www.danieladirosa.com/kvinders-asics-gel-noosa-tri-8-sort-gr%C3%A5-skoj">kvinders asics gel noosa tri 8 sort gr氓</a>
    highbacklink http://www.highbacklink.com/

  3. avatar videoaulaneri

    <a href="http://www.kywordsmith.com/adidas-rubber-shoes-black-shoesk">adidas rubber shoes black</a> <a href="http://www.zanelebeauty.com/nike-tiempo-legend-sort-gr%C3%B8n-skol">nike tiempo legend sort gr酶n</a> <a href="http://www.ukclubdj.com/kvinner-nike-air-max-270-svart-hvit-obuvk">kvinner nike air max 270 svart hvit</a> <a href="http://www.statusmarathi.com/rosa-and-bianca-nike-air-max-scarpei">rosa and bianca nike air max</a> <a href="http://www.theartofaj.com/hombres-nike-air-presto-amarillo-verde-zapatosh">hombres nike air presto amarillo verde</a> <a href="http://www.paralirulet.com/adidas-15.1-tf-fluorescent-gr%C3%B8n-sort-skok">adidas 15.1 tf fluorescent gr酶n sort</a>
    videoaulaneri http://www.videoaulaneri.com/

  4. avatar marieluwasche

    <a href="http://www.lvnailbar.com/kvinners-nike-air-max-06-run-bl%C3%A5-obuvi">kvinners nike air max 06 run bl氓</a> <a href="http://www.eisenhards.com/adidas-ace-15.1-solar-amarillo-zapatosl">adidas ace 15.1 solar amarillo</a> <a href="http://www.martinmakeup.com/adidas-porsche-design-s3-nero-scarpeh">adidas porsche design s3 nero</a> <a href="http://www.dgrabovsky.com/adidas-16.3-tf-orange-grey-shoesk">adidas 16.3 tf orange grey</a> <a href="http://www.madeinmyindia.com/ray-ban-rb4162-sunglasses-grey-gradient-transparent-crystal-fram-sunglassesh">ray ban rb4162 sunglasses grey gradient transparent crystal fram</a> <a href="http://www.manglammovers.com/adidas-superstar-blanc-and-holographic-chaussuresl">adidas superstar blanc and holographic</a>
    marieluwasche http://www.marieluwasche.com/

  5. avatar vuduchoan

    <a href="http://www.hinogi.com/mens-nike-air-force-1-green-black-shoesj">mens nike air force 1 green black</a> <a href="http://www.prontosignsus.com/nike-free-run-2-herre-hvid-skoq">nike free run 2 herre hvid</a> <a href="http://www.ticahome.com/air-jordan-future-gris-argent-chaussuresl">air jordan future gris argent</a> <a href="http://www.prformusic.com/nike-flyknit-roshe-run-bleu-ciel-argent-chaussuresq">nike flyknit roshe run bleu ciel argent</a> <a href="http://www.tatilblogu.com/air-jordan-ultra-fly-himmelblau-silber-schuhei">air jordan ultra fly himmelblau silber</a> <a href="http://www.danieladirosa.com/dam%C3%A4nner-nike-lunarglide-6-lila-gr%C3%BCn-schuheh">dam盲nner nike lunarglide 6 lila gr眉n</a>
    [url=http://www.vuduchoan.com/]vuduchoan[/url]

  6. avatar lemodemo

    <a href="http://www.soopsip.com/nike-free-rn-marine-bleu-blanc-chaussures-chaussuresj">nike free rn marine bleu blanc chaussures</a> <a href="http://www.laodikyahaber.com/m%C3%A4nner-nike-solarsoft-mule-schwarz-slide-sandals-schuhek">m盲nner nike solarsoft mule schwarz slide sandals</a> <a href="http://www.dateplannerz.com/minnesota-vikings-stitched-jersey-nflh">minnesota vikings stitched jersey</a> <a href="http://www.ultimumbaby.com/nike-stefan-janoski-max-trainers-in-svart-obuvi">nike stefan janoski max trainers in svart</a> <a href="http://www.cksholdings.com/nike-mercurial-superfly-v-ag-pro-purple-orange-black-shoesj">nike mercurial superfly v ag pro purple orange black</a> <a href="http://www.rosebasil.com/light-purple-converse-shoesl">light purple converse</a>
    lemodemo http://www.lemodemo.com/

  7. avatar PDM系统

    学习一下

  8. avatar 大众搬家公司

    学习了 点个赞

  9. avatar 宁波PDM

    讲得很实用啊

欢迎留言




用户登录

sitemap