Skip to content

Commit b147165

Browse files
committed
2 parents 234cd91 + c58acb7 commit b147165

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,17 @@ final class NibBasedCollectionViewCell: UICollectionViewCell, NibReusable {
131131
```
132132
</details>
133133

134-
## 2. Register your cells
134+
## 2. Either enable AutoRegistering or manually register your cells
135+
In order to have your cells automatically registered to a TableView/CollectionView when they are first used, simply add conformance to the `AutoRegistering` protocol.
136+
137+
```swift
138+
final class CustomCell: UITableViewCell, Reusable, AutoRegistering { }
139+
```
140+
141+
If you've prototyped your cell in a Storyboard, there is no need to conform to 'AutoRegistering' or manually register, as this is done automatically by the Storyboard.
135142

136-
Unless you've prototyped your cell in a Storyboard, you'll have to register the cell class or Nib by code.
137143

138-
To do this, instead of calling `registerClass(…)` or `registerNib(…)` using a String-based `reuseIdentifier`, just call:
144+
Alternatively you will have to register the cell class or Nib by code. To do this, just call:
139145

140146
```swift
141147
tableView.register(cellType: theCellClass.self)

0 commit comments

Comments
 (0)