我如何给出一个“标识符"?到我的故事板中的视图控制器? [英] How do I give an "identifier" to a view controller within my storyboard?

查看:17
本文介绍了我如何给出一个“标识符"?到我的故事板中的视图控制器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

instantiateViewControllerWithIdentifier: 方法要求我传递的视图控制器有一个标识符.我转到我的故事板并单击我的视图控制器,但我看不到设置标识符的选项.我在哪里可以找到这个选项?

The instantiateViewControllerWithIdentifier: method requires that the view controller I pass have an identifier. I went to my storyboard and clicked on my view controller, but I see no option to set the identifier. Where exactly do I find this option?

推荐答案

如图所示!希望有帮助!

As the Image suggests! Hope it helps!

然后调用它来使用它:

[self.storyboard instantiateViewControllerWithIdentifier:@"YourViewControllerID"];

这篇关于我如何给出一个“标识符"?到我的故事板中的视图控制器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆