Skip to content

Commit

Permalink
feat: tableBuilder - setSectionHeaderTopPadding
Browse files Browse the repository at this point in the history
  • Loading branch information
insub4067 committed Dec 6, 2023
1 parent 146bb9f commit 92eb891
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ lazy var tableRefresh = RefreshControlBuilder()

Builder
lazy var tableView = TableViewBuilder()
.setSectionHeaderTopPadding(16)
.setRefreshControl(tableRefresh)
.setDelegate(self)
.setDataSource(self)
Expand Down
6 changes: 6 additions & 0 deletions Sources/UIBuilder/Scroll/TableViewBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ public class TableViewBuilder: ScrollViewBuilder<UITableView> {
return self
}

@available(iOS 15.0, *)
public func setSectionHeaderTopPadding(_ padding: CGFloat) -> Self {
view.sectionHeaderTopPadding = padding
return self
}

public func bind<T>(
items: Published<[T]>.Publisher,
_ cancellables: inout Set<AnyCancellable>,
Expand Down

0 comments on commit 92eb891

Please sign in to comment.