简体   繁体   English

将Interface Builder中的UITextField连接到代码中定义的IBOutlet

[英]Connecting UITextField in Interface Builder to IBOutlet defined in code

Any idea why IB doesn't let me make this connection? 知道为什么IB不允许我建立连接吗?

替代文字

In the Identity Inspector for that views File's Owner, make sure that the Class is set to MainScreenViewController . 在该视图的文件所有者的Identity Inspector中,确保将Class设置为MainScreenViewController If you could add a screenshot of your MainScreenViewController.xib window that may be more helpful. 如果您可以添加MainScreenViewController.xib窗口的屏幕截图,可能会更有帮助。

You are trying to link two different IB documents, ie two different .xib files, which is not possible. 您正在尝试链接两个不同的IB文档,即两个不同的.xib文件,这是不可能的。 I think you really only want to have one .xib file here. 我想你真的只想在这里有一个.xib文件。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM