[英]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.