Skip to content

Commit 10d2960

Browse files
committed
Part 5
1 parent 4284494 commit 10d2960

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

TestSwift/SearchResultsViewController.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ class SearchResultsViewController: UIViewController, UITableViewDataSource, UITa
3838

3939
var rowData: NSDictionary = self.tableData[indexPath.row] as NSDictionary
4040

41-
cell.text = rowData["trackName"] as String
41+
// Add a check to make sure this exists
42+
let cellText: String? = rowData["trackName"] as? String
43+
cell.text = cellText
4244
cell.image = UIImage(named: "Icon76")
4345

4446

0 commit comments

Comments
 (0)