Created
August 11, 2018 15:17
-
-
Save maximbilan/13ee42a21d97d9c50b0a2f340bd9ff5a 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
public extension UIView { | |
class func fromNib<T: UIView>() -> T { | |
return Bundle.main.loadNibNamed(String(describing: T.self), owner: nil, options: nil)![0] as! T | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment