xcode - 如何将 ibOutlet 从 subview 链接到 Storyboard xcode 中的自定义 UIView 类

标签 xcode uiview storyboard interface-builder iboutlet

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

enter image description here

最佳答案

这是一个解决方案:

1) 输入 IBOutlet 手工 在您的头文件中,例如:

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

2) 拖动图钉 来自代码 到文档大纲区域中的元素

enter image description here

关于xcode - 如何将 ibOutlet 从 subview 链接到 Storyboard xcode 中的自定义 UIView 类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28052924/

相关文章:

objective-c - 如何在 "setUp"方法 Xcode 6 中使用异步过程(例如,登录)进行单元测试

swift - 创建从 .xib 文件中的 UIButton 到 ViewController 的 Segue

Swift colorWithAlphaComponent() 不起作用

swift - 我必须使用协议(protocol)/委托(delegate)来让 ViewController 执行在另一个类中创建的 UIButton 的操作吗?

wpf - 在另一个 Storyboard时间线中启动 Storyboard

xcode - 在 Mac OSX 10.6.8 上安装 f2c

xcode - 没有Phonegap构建的Phonegap/Cordova到ipa文件

ios - 通过 UITapGestureRecognizer 移除 UIView 需要点击 2 次(快速)

ios - 修复静态 tableviewcontroller xcode 8 中 Storyboard 中的所有警告

swift - "Unwind"从任何 View Controller 返回 Storyboard的初始 View Controller