Skip to content

Instantly share code, notes, and snippets.

@quangtqag
Created June 21, 2016 06:48
Show Gist options
  • Save quangtqag/08b0b5c8a6831a6ae52fe55900dd80c3 to your computer and use it in GitHub Desktop.
Save quangtqag/08b0b5c8a6831a6ae52fe55900dd80c3 to your computer and use it in GitHub Desktop.
class MyView: UIView {
@IBOutlet weak var label: UILabel!
class func instanceFromNib() -> MyView {
return UINib(nibName: "MyView", bundle: nil).instantiateWithOwner(nil, options: nil)[0] as! MyView
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment