问题描述
在我以前使用initWithNibName分配和初始化视图控制器之前,其中Nib名称的参数只是xib/nib文件的名称.
Before I used to allocate and initialize a view controller using initWithNibName, where the parameter for the Nib name is simply the name of the xib/nib file.
但是,现在Xcode/IB与Storyboard一起使用的方式,我不确定用各自的xib/nib初始化视图控制器类需要做什么.
However, with the way Xcode/IB works with Storyboards now, I'm not sure what I need to do to initialize a view controller class with it's respective xib/nib.
在我的情节提要中,我创建了一个视图控制器,并从另一个视图控制器中引用了它,并将其指定为Popover类型.
In my storyboard i have created the view controller and referenced it (from another view controller) and specified it as a Popover type.
有什么想法可以实现吗?
Any ideas how this is accomplished?
谢谢.
*更新*
Apple文档说
但是我不知道如何通过IB分配唯一的ID.该怎么做?
But I can't figure out how to assign a unique id via IB. How to do this?
推荐答案
XCode 4.4 and earlier: Identifier;
XCode 4.5: Storyboard ID
这篇关于如何从MainStoryboard为UIViewController分配标识符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!