Skip to content

Commit

Permalink
Don't call super.loadView for NSCollectionViewItem
Browse files Browse the repository at this point in the history
This seems to be only useful if you want nib based initialization. May
resolve an issue on macOS 12.
  • Loading branch information
NattyNarwhal committed Jul 21, 2024
1 parent ab40485 commit 6aafb81
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Submariner/SBAlbumViewItem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ fileprivate let logger = Logger(subsystem: Bundle.main.bundleIdentifier!, catego
}

override func loadView() {
super.loadView()
// don't call super.loadView(), it's for nib based
// but do set an empty view here; if not, then calling the view getter in regenerateView will infinite loop
view = NSView()

regenerateView()
}
Expand Down

0 comments on commit 6aafb81

Please sign in to comment.