Skip to content

Commit 8bd1021

Browse files
committed
Ammend example code
1 parent 2d90e0a commit 8bd1021

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

TDBadgedCell/ViewController.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ class ViewController: UITableViewController {
2828
return demoItems.count
2929
}
3030

31-
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> TDBadgedCell {
32-
var cell : TDBadgedCell? = tableView.dequeueReusableCell(withIdentifier:"BadgedCell") as! TDBadgedCell?;
33-
if((cell == nil)) {
31+
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
32+
var cell = tableView.dequeueReusableCell(withIdentifier:"BadgedCell") as? TDBadgedCell;
33+
if(cell == nil) {
3434
cell = TDBadgedCell(style: .default, reuseIdentifier: "BadgedCell");
3535
}
3636

0 commit comments

Comments
 (0)