如何将ibOutlet从子视图链接到情节提要Xcode中的自定义UIView类 [英] How to link ibOutlet from subview to custom UIView Class in storyboard xcode

查看:77
本文介绍了如何将ibOutlet从子视图链接到情节提要Xcode中的自定义UIView类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我认为这张图片说明了一切.我有一个UIView的子类,该类已输入到class字段中.我正在尝试在情节提要和类实现之间连接ibOutlets.它没有给我一个错误,但也没有起作用.这是另一个xcode错误,还是我希望它能以某种不会的方式工作?

I think this image explains it all. I have a subclass of UIView that I've entered into the class field. I'm trying to connect ibOutlets between the storyboard and class implementation. It's not giving me an error, but it's not working either. Is this another xcode bug, or am I expecting this to work in a way that it won't?

推荐答案

以下是解决方案:

1)在头文件示例中手动输入IBOutlet :

@property (strong, nonatomic) IBOutlet ProgressBarElementView *targetProgressElement;

2)将图钉从代码拖动到文档轮廓区域中的元素

2) Drag the pin from the code to the element in document outline zone

这篇关于如何将ibOutlet从子视图链接到情节提要Xcode中的自定义UIView类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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