Skip to content

Instantly share code, notes, and snippets.

@tomkowz
Created November 10, 2014 14:03
Show Gist options
  • Select an option

  • Save tomkowz/e0b9875f036ecb63a2d1 to your computer and use it in GitHub Desktop.

Select an option

Save tomkowz/e0b9875f036ecb63a2d1 to your computer and use it in GitHub Desktop.
override func awakeAfterUsingCoder(aDecoder: NSCoder) -> AnyObject? {
if self.subviews.count == 0 {
let nib = UINib(nibName: "MessageControl", bundle: nil)
let view = nib.instantiateWithOwner(nil, options: nil).first! as MessageControl
view.setTranslatesAutoresizingMaskIntoConstraints(false)
return view
}
return self
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment