diff --git a/CHANGELOG.md b/CHANGELOG.md index 321f893..93d05dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,20 @@ # CHANGELOG +## Unreleased + +* Fix nib name lookup when using subclassing. + [@calmez](https://github.com/calmez) + [#96](https://github.com/AliSoftware/Reusable/pull/96) + ## 4.1.0 -* Support for Swift 5.0 +* Support for Swift 5.0 [@florentmorin](https://github.com/florentmorin) [#80](https://github.com/AliSoftware/Reusable/pull/80) ## 4.0.5 -* Fix for only allowing the use of app extension API. +* Fix for only allowing the use of app extension API. [@igorkulman](https://github.com/igorkulman) [#73](https://github.com/AliSoftware/Reusable/pull/73) diff --git a/Sources/View/NibOwnerLoadable.swift b/Sources/View/NibOwnerLoadable.swift index cd94b41..7798a07 100644 --- a/Sources/View/NibOwnerLoadable.swift +++ b/Sources/View/NibOwnerLoadable.swift @@ -39,7 +39,7 @@ public extension NibOwnerLoadable where Self: UIView { */ func loadNibContent() { let layoutAttributes: [NSLayoutConstraint.Attribute] = [.top, .leading, .bottom, .trailing] - for case let view as UIView in Self.nib.instantiate(withOwner: self, options: nil) { + for case let view as UIView in type(of: self).nib.instantiate(withOwner: self, options: nil) { view.translatesAutoresizingMaskIntoConstraints = false self.addSubview(view) NSLayoutConstraint.activate(layoutAttributes.map { attribute in