Tag: ibdesignable

无法呈现IB Designables的实例

我有一个Objective-C和Swift混合dynamic框架。 混合框架与两个纯粹的Objective-Cdynamic框架相连。 当我试图在IB Designable的混合框架中标记任何类,并在storyboard或nib中使用该类时,Xcode始终表示它的实例未能呈现。 并有错误消息: IB Designables:无法呈现WZUITokenField的实例:dlopen(WZUIKit.framework,1):未加载库:/Library/Frameworks/WZFoundation.framework/WZFoundation引用自:WZUIKit.framework原因:未find图像 IB Designables:无法更新自动布局状态:dlopen(WZUIKit.framework,1):未加载库:@ rpath / WZFoundation.framework / WZFoundation引用自:WZUIKit.framework原因:未find图像 框架WZUIKit是Objective-C和Swift混合框架,WZFoundation是纯粹的Objective-C。 另外,所有这些配对都可以在设备或模拟器上使用。

界面生成器 – 无法从path加载devise器(null)

我有我创build的一些自定义控件,我是他们在一个新的项目中使用。 但是,我不断收到界面构build器中的错误: Failed to update auto layout status: Failed to load designables from path (null) 要么 Failed to render instance of <control>: Failed to load designables from path (null) 我testing了另一个项目中的控件,他们似乎在界面生成器中正确渲染,但我不能让他们在当前项目中工作。 什么原因导致这个错误,我该如何解决? 提前致谢…

IB_DESIGNABLE,IBInspectable – 接口生成器不更新

我有以下一组代码: CustomView.h #import <UIKit/UIKit.h> IB_DESIGNABLE @interface CustomView : UIView @property (nonatomic) IBInspectable UIColor *borderColor; @property (nonatomic) IBInspectable CGFloat borderWidth; @property (nonatomic) IBInspectable CGFloat cornerRadius; @end CustomView.m #import "CustomView.h" @implementation CustomView – (void)setBorderColor:(UIColor *)borderColor { _borderColor = borderColor; self.layer.borderColor = borderColor.CGColor; } – (void)setBorderWidth:(CGFloat)borderWidth { _borderWidth = borderWidth; self.layer.borderWidth = borderWidth; } – (void)setCornerRadius:(CGFloat)cornerRadius { _cornerRadius […]

@IBDesignable错误:IB Designables:无法更新自动布局状态:Interface Builder Cocoa Touch Tool崩溃

我有一个非常简单的UITextView的子类,它添加了可以在Text Field对象中find的“占位符”function。 这是我的子类的代码: import UIKit import Foundation @IBDesignable class PlaceholderTextView: UITextView, UITextViewDelegate { @IBInspectable var placeholder: String = "" { didSet { setPlaceholderText() } } private let placeholderColor: UIColor = UIColor.lightGrayColor() private var textColorCache: UIColor! override init(frame: CGRect) { super.init(frame: frame) self.delegate = self } required init(coder aDecoder: NSCoder) { super.init(coder: aDecoder) self.delegate = self […]