You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ A registration for the table view’s cells similar to `UICollectionView.CellReg
46
46
47
47
Use a cell registration to register table cell views with your table view and configure each cell for display.
48
48
49
-
The following example creates a cell registration for cells of type `UITableViewCell`. Each cells textfield displays its item.
49
+
The following example creates a cell registration for cells of type `UITableViewCell` and string items. Each cells textfield displays its item string.
50
50
51
51
```swift
52
52
let cellRegistration = UITableView.CellRegistration<UITableViewCell, String> { cell, indexPath, string in
@@ -75,9 +75,11 @@ let dataSource = UITableViewDiffableDataSource(tableView: myTableView, cellRegis
75
75
}
76
76
```
77
77
78
-
## UITableView Header/Footer View Registration
78
+
## UITableView Section View Registration
79
79
80
-
A registration for the table view’s header/footer views.
80
+
A registration for the table view’s header/footer section views.
81
+
82
+
The following example creates a section view registration for views of type `UITableViewHeaderFooterView` for sections with strings. Each section header views default content configuration text displays its section string.
81
83
82
84
```swift
83
85
let sectionViewRegistration = UITableView.SectionViewRegistration<UITableViewHeaderFooterView, String> {
@@ -97,7 +99,7 @@ dataSource.headerViewProvider = { tableView, section in
97
99
}
98
100
```
99
101
100
-
You can also ``applyHeaderViewRegistration()`` and `applyFooterViewRegistration()``:
102
+
Alternatively you can also ``applyHeaderViewRegistration()`` and `applyFooterViewRegistration()``:
0 commit comments