Created
November 2, 2015 03:08
-
-
Save patrykpoborca/e2cddf2d2e07ce716a45 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @objc func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { | |
| let userCell = tableView.dequeueReusableCellWithIdentifier("user", forIndexPath: NSIndexPath(forRow: 0, inSection: 0)) as! GithubUserCell; | |
| if let unwrapped = users { | |
| let user = unwrapped[indexPath.row]; | |
| userCell.userName.text = user.login; | |
| userCell.imageView?.image = nil; | |
| ImageLoader.load(NSURL(string: user.imageUrl!)!).completionHandler{ (u : NSURL, i : UIImage?, e : NSError?, c : CacheType) -> Void in | |
| userCell.imageView?.image = i; | |
| }; | |
| } | |
| return userCell; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment