Skip to content

Commit d86ef36

Browse files
committed
Part 5
1 parent 10d2960 commit d86ef36

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

TestSwift/SearchResultsViewController.swift

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -71,19 +71,6 @@ class SearchResultsViewController: UIViewController, UITableViewDataSource, UITa
7171
// Store the image in to our cache
7272
self.imageCache.setValue(image, forKey: urlString)
7373
cell.image = image
74-
75-
dispatch_async(dispatch_get_main_queue()) {
76-
// Back on the main thread, let's set the image view of the cell to use our amazing new image
77-
// First, we need to make sure the cell hasn't gone off the screen, or worse, been re-used
78-
// Validate the cell is still available by using cellForRowAtIndexPath
79-
var sCell: UITableViewCell? = tableView.cellForRowAtIndexPath(indexPath)
80-
81-
// If the cell exists, we're good and we can update it with this image
82-
if sCell? {
83-
let pCell: UITableViewCell = sCell!
84-
pCell.image = image
85-
}
86-
}
8774
}
8875
else {
8976
println("Error: \(error.localizedDescription)")

0 commit comments

Comments
 (0)