[英]iOS6: How to connect UIViewController in Storyboard via Identifier?
有谁知道如何在Storyboard中使用标识符连接UIViewControllers? 它似乎不再起作用。
选择UIViewController,一旦看到突出显示的UIView(通常为蓝色),然后转到XCODE上最左侧的列。 选择属性检查器,您将在“视图控制器”部分中看到“标题”和“标识符”标签。 给它起任何名字,然后在程序中引用您的视图控制器,您可以执行以下操作:
UIStoryboard *us = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle: nil];
FirstViewController *fvc = [storyboard instantiateViewControllerWithIdentifier:@"firstview"];
这有效,让我知道您是否有任何问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.