File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
WooCommerce/Classes/Extensions Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,16 @@ import UIKit
66///
77extension UIView {
88
9+ /// Returns the Nib associated with the received: It's filename is expected to match the Class Name
10+ ///
11+ class func loadNib( ) -> UINib {
12+ return UINib ( nibName: classNameWithoutNamespaces, bundle: nil )
13+ }
14+
915 /// Returns the first Object contained within the nib with a name whose name matches with the receiver's type.
1016 /// Note: On error this method is expected to break, by design!
1117 ///
12- class func loadFromNib< T> ( ) -> T {
13- let nib = UINib ( nibName: classNameWithoutNamespaces, bundle: nil )
14- return nib. instantiate ( withOwner: nil , options: nil ) . first as! T
18+ class func instantiateFromNib< T> ( ) -> T {
19+ return loadNib ( ) . instantiate ( withOwner: nil , options: nil ) . first as! T
1520 }
1621}
You can’t perform that action at this time.
0 commit comments