简体   繁体   English

iOS的Interface Builder中没有IBOutlets

[英]no IBOutlets in Interface Builder in iOS

I have declared IBOutlets in the header file but when I open the XIB file and click on the View(my class is a UIViewController sublass adopting TableViewDelegate), I see only the referencing outlets and no IBOutlet. 我已经在头文件中声明了IBOutlets,但是当我打开XIB文件并单击View(我的类是采用TableViewDelegate的UIViewController子视图)时,我仅看到引用出口,而没有IBOutlet。 Please advise. 请指教。

NamRatha, go to File's Owner file in your Nib file, now go to the last tab in the inspector. NamRatha,转到Nib文件中的“文件所有者”文件,现在转到检查器中的最后一个选项卡。 In the class Identity choose from the list your class. 在班级标识中,从列表中选择班级。 You should be able to see now your IBOutlets. 您现在应该可以看到IBOutlets。

您需要在控制器引用而不是视图上设置类。

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

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