Class Interface Builder视图的类(类型)与IBOutlet之间的关系

Class Interface Builder视图的类(类型)与IBOutlet之间的关系,class,interface-builder,iboutlet,Class,Interface Builder,Iboutlet,我只想确认我是否正确理解,在Interface Builder中,name.xib摘要窗口中Type下列出的Class Identity下设置的类是视图的类,而在IBMoutlet Class*viewName中列出的类描述了与Interface Builder的连接的性质,是否正确 e、 g 名称\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu类型 文件所有者\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu

我只想确认我是否正确理解,在Interface Builder中,name.xib摘要窗口中Type下列出的Class Identity下设置的类是视图的类,而在IBMoutlet Class*viewName中列出的类描述了与Interface Builder的连接的性质,是否正确

e、 g

名称\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu类型

文件所有者\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu

第一响应者\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu响应者

MyLabel uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuiLabel

IBUILabel*lblMyLabel

UILabel是标签的类,而IBOutlet UILabel是代码和IB对象之间的连接类型,对吗


我之所以这样问,是因为我将UIImageView子类化并更新了视图的类,但将IBOutlet声明保留为IBOutlet UIImageView,并且它仍然有效,因此我假设IBOutlet部分只是一个说明或指南。

如果您是在类的@interface部分中输入的IBOutlet关键字,如下所示:


@interface Myclass {
  IBOutlet SomeOtherClass *myObj;
}
,这将告诉Interface Builder,您将使用该类成员连接到Interface Builder中的某个其他类对象。编写此成员后,您将能够在interface builder中将此对象的连接拖动到SomeOtherClass对象,并选择myObj出口,当运行时读取.nib时,您将使对象及其之间的连接可用。
您提到的UILabel实际上是对象的类

我想了解的是,为什么我的SwipeableImage只在我将其类设置为SwipeableImageView类时才起作用,而将interface builder变量设置为IBOutlet UIImageView*mySwipeableImageView,当然interface builder连接也应该设置为IBOutlet SwipeableImage*mySwipeableImageView?没关系,原来这是IB的问题,下次我启动机器时,一切正常。