Skip to content

Commit

Permalink
update example
Browse files Browse the repository at this point in the history
  • Loading branch information
CalvinChangCC committed May 22, 2024
1 parent 725c144 commit 5a2e38b
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import SectionKit
import UIKit

final class NamesSectionController: ListCompositionalLayoutSectionController<
final class NamesSectionController: ListSectionController<
NamesSectionViewModelType,
String
> {
override func layoutSection(
layoutEnvironment: NSCollectionLayoutEnvironment
) -> NSCollectionLayoutSection {
override var layoutProvider: SectionLayoutProvider? {
let layoutSize = NSCollectionLayoutSize(
widthDimension: .fractionalWidth(1),
heightDimension: .estimated(50)
Expand Down Expand Up @@ -37,7 +35,9 @@ final class NamesSectionController: ListCompositionalLayoutSectionController<
} else {
layout.boundarySupplementaryItems = []
}
return layout
return .compositionalLayout(
.init(layoutSection: { _ in layout })
)
}

override func items(for model: NamesSectionViewModelType) -> [String] {
Expand Down

0 comments on commit 5a2e38b

Please sign in to comment.