[英]IBOutlet not coming
I have an FYImageSequence
class which inherits UIImageView
. 我有一个
FYImageSequence
类,它继承了UIImageView
。 But still I can't connect it as an outlet in storyboard. 但是我仍然不能将它作为情节提要中的插座连接。 This is what is in my header file.
这就是我的头文件中的内容。
@interface FVImageSequence : UIImageView {
NSString *prefix;
int numberOfImages;
int current;
int previous;
NSString *extension;
int increment;
}
In the view controller I have 在视图控制器中,我有
IBOutlet FVImageSequence *imageSquence;
There is no error, but I am not able to see the outlet when I connect from storyboard. 没有错误,但是从情节提要板连接时我看不到插座。
答案非常简单..自继承以来,将您的类名称更改为nib中的类(最好使用UIView
而不是添加UIImageView
),然后只能访问属性
更改ViewController的Class Property的类名称,并将您的imageview类imageView更改为情节提要中的FVImageSequence。
将您的类从UIIMageView
FVImageSequence
为情节FVImageSequence
中的FVImageSequence
,这将解决问题
在storyView的View Controller的Class属性中设置类名称。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.