Skip to content

Commit

Permalink
Fix for macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanPodymov committed Dec 14, 2023
1 parent 0d1a3cc commit be356cf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Sources/CommonAppleKit/CAListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ open class CAListView<Cell: CAListViewCell<CellRootView>, 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
Expand Down
2 changes: 1 addition & 1 deletion Sources/CommonAppleKit/CAListViewCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ open class CAListViewCell<RootView: CAView>: CACollectionViewCell {

#if canImport(AppKit)
open override func loadView() {
let rootView = createRootView(frame: frame)
let rootView = createRootView(frame: .zero)
view = rootView
self.rootView = rootView
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/CommonAppleKit/CAScrollableListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ open class CAScrollableListView<Cell: CAListViewCell<CellRootView>, 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<Cell, CellRootView>(frame: frame, itemSize: itemSize, cellId: cellId)
documentView = listView
Expand Down

0 comments on commit be356cf

Please sign in to comment.