Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class EmbeddableCustomView: UIView, HasNib {
override init(frame: CGRect) {
super.init(frame: frame)
// Render xib view from code.
commonInit()
}
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
// Render xib view from interface builder.
commonInit()
}
private func commonInit() {
// layout .xib view tree & activate layout constraints.
loadNibContent()
// Your setup code below.
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.