When I write my own UIButton
-extended class and make it @IBDesignable
, I receive two errors in Interface Builder, namely:
- Main.storyboard: error: IB Designables: Failed to update auto layout status: The agent crashed because the fd closed
- Main.storyboard: error: IB Designables: Failed to render instance of RandjeUIButton: The agent crashed
Here is my code:
import UIKit
@IBDesignable
class RandjeUIButton: UIButton {
required init(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
self.backgroundColor = UIColor.blackColor()
}
}
I am working in Xcode 7 beta 2 on OS X 10.11 beta 2. (Running in VM)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…