Last active
March 27, 2019 10:39
-
-
Save jonathanduty/2bdcdf94aab2884d075f5d66883a4b7d to your computer and use it in GitHub Desktop.
UIView+Extensions
This file contains hidden or 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 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