diff --git a/Sources/CommonAppleKit/CAListView.swift b/Sources/CommonAppleKit/CAListView.swift index 80db415..deb47dc 100644 --- a/Sources/CommonAppleKit/CAListView.swift +++ b/Sources/CommonAppleKit/CAListView.swift @@ -19,7 +19,7 @@ open class CAListView, CellRootView>: CAColle } #endif - public init(frame: CGRect, itemSize: CGSize, cellId: String = String(describing: Cell.self)) { + public init(frame: CGRect, itemSize: CGSize, cellId: String = .init(describing: Cell.self)) { self.cellId = cellId let layout = CACollectionViewFlowLayout() layout.itemSize = itemSize diff --git a/Sources/CommonAppleKit/CAListViewCell.swift b/Sources/CommonAppleKit/CAListViewCell.swift index cc7fb0a..4951643 100644 --- a/Sources/CommonAppleKit/CAListViewCell.swift +++ b/Sources/CommonAppleKit/CAListViewCell.swift @@ -17,7 +17,7 @@ open class CAListViewCell: CACollectionViewCell { #if canImport(AppKit) open override func loadView() { - let rootView = createRootView(frame: frame) + let rootView = createRootView(frame: .zero) view = rootView self.rootView = rootView } diff --git a/Sources/CommonAppleKit/CAScrollableListView.swift b/Sources/CommonAppleKit/CAScrollableListView.swift index 7045834..c840e0a 100644 --- a/Sources/CommonAppleKit/CAScrollableListView.swift +++ b/Sources/CommonAppleKit/CAScrollableListView.swift @@ -16,7 +16,7 @@ open class CAScrollableListView, CellRootView } } - public init(frame: CGRect, itemSize: CGSize, cellId: String) { + public init(frame: CGRect, itemSize: CGSize, cellId: String = .init(describing: Cell.self)) { super.init(frame: frame) let listView = CAListView(frame: frame, itemSize: itemSize, cellId: cellId) documentView = listView