简体   繁体   English

InstantiateInitialViewController和InstantiateViewControllerWithIdentifier之间有什么区别?

[英]What's the difference between instantiateInitialViewController and instantiateViewControllerWithIdentifier:?

If I have a storyboard whose viewcontroller has been tagged. 如果我有一个故事板,其视图控制器已被标记。 then What's the difference between these 2 APIs? 那么这两个API有什么区别?

What I want to know is whether there is some difference on returned object. 我想知道的是,返回的对象是否存在某些差异。 are they exactly same or one of them will initialize more things? 它们是完全相同还是其中之一将初始化更多东西?

Use instantiateInitialViewController: to instatiate the default view (initial), this is something you wouldn't do programmatically usually 使用InstantiateInitialViewController :初始化默认视图(初始),这是您通常不会以编程方式执行的操作

Use instantiateViewControllerWithIdentifier: when you would like a ViewController And attach a view from the storyboard (storyboard Id (Identifier)) 在需要ViewController并从storyboard (storyboard Id(Identifier))附加视图时,请使用InstantiateViewControllerWithIdentifier:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用instantiateViewControllerWithIdentifier和performseguewithidentifier有什么区别? - What is the difference between using instantiateViewControllerWithIdentifier and performseguewithidentifier? InstantiateViewControllerWithIdentifier和initWithNibName之间的区别? - Difference between instantiateViewControllerWithIdentifier and initWithNibName? swift中的:和=有什么区别 - What's the difference between : and = in swift UIStoryboard的InstantiateViewControllerWithIdentifier SIGABRT崩溃 - UIStoryboard's instantiateViewControllerWithIdentifier SIGABRT crash CoreBluetooth和ExternalAccessory框架之间有什么区别? - What's the difference between the CoreBluetooth and ExternalAccessory frameworks? 可选:[String?]和[String]有什么区别? - Optionals: What's the difference between [String?] and [String]? 视图和超级视图有什么区别? - What's the difference between view and superview? downloadtaskwithrequest和downloadtaskwithurl之间的区别是什么 - What's the difference between downloadtaskwithrequest and downloadtaskwithurl NSCell和NSControl之间的关系/区别是什么? - What's is the relationship/difference between NSCell and NSControl? `* .framework`,`* .dylib`和`* .a` libs有什么区别 - What's the difference between `*.framework`, `*.dylib` and `*.a` libs
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM