Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# CHANGELOG

## Unreleased

* Dynamic dispatch of nib name lookup
[@calmez](https://github.com/calmez)
[#96](https://github.com/AliSoftware/Reusable/pull/96)

## 4.1.0

* Support for Swift 5.0
Expand Down
2 changes: 1 addition & 1 deletion Sources/View/NibOwnerLoadable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down