Skip to content

Commit 6e244de

Browse files
committed
Fix optinal get for table
1 parent cf5aaa4 commit 6e244de

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Example/Controllers/DiffableTableController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class DiffableTableController: SPDiffableTableController, SPTableDiffableMediato
88

99
override func viewDidLoad() {
1010
super.viewDidLoad()
11-
tableView?.register(NativeTableViewCell.self, forCellReuseIdentifier: NativeTableViewCell.identifier)
11+
tableView.register(NativeTableViewCell.self, forCellReuseIdentifier: NativeTableViewCell.identifier)
1212
setCellProviders([CellProvider.default], sections: content)
1313
diffableDataSource?.mediator = self
1414
}

Readme.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Apple's diffable API requerid models for each object type. If you want use it in many place, you pass many time to implemenet and get over duplicates codes. This project help you do it elegant with shared models and special cell providers for one-usage models.
44

5-
If you like the project, do not forget to `put star ★` and follow me on GitHub:
5+
If you like the project, don't forget to `put star ★` and follow me on GitHub:
66

77
[![https://github.com/ivanvorobei](https://github.com/ivanvorobei/SPPermissions/blob/master/Assets/Buttons/follow-me-on-github.svg)](https://github.com/ivanvorobei)
88

@@ -92,7 +92,7 @@ override func viewDidLoad() {
9292
super.viewDidLoad()
9393

9494
// Register cell for usage it in table view
95-
tableView?.register(NativeTableViewCell.self, forCellReuseIdentifier: NativeTableViewCell.identifier)
95+
tableView.register(NativeTableViewCell.self, forCellReuseIdentifier: NativeTableViewCell.identifier)
9696

9797
// Cell provider for `TableRowMode`
9898
let cellProvider: SPDiffableTableCellProvider = { (tableView, indexPath, model) -> UITableViewCell? in
@@ -132,7 +132,7 @@ let section = SPDiffableSection(
132132
guard let self = self else { return }
133133
self.tableView.deselectRow(at: indexPath, animated: true)
134134
print("Tapped")
135-
}),
135+
})
136136
]
137137
)
138138

@@ -189,7 +189,7 @@ Now you can implemented requerid methods, for example title of header:
189189

190190
```swift
191191
func diffableTableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
192-
return "Ovverided in of diffable mediator"
192+
return "Overridden in of diffable mediator"
193193
}
194194
```
195195

0 commit comments

Comments
 (0)