There are 2 different ways, to create custom view from XIB
extension UIView { static func instanceFromNib() -> T