Created
January 13, 2017 16:28
-
-
Save alexandreraulin/fb8cfbc1f932bb3b1ad5f04beaa571b7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension UIView { | |
class func loadFromNibNamed(nibNamed: String, bundle : NSBundle? = nil) -> UIView? { | |
return UINib( | |
nibName: nibNamed, | |
bundle: bundle | |
).instantiateWithOwner(nil, options: nil)[0] as? UIView | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment