diff options
author | Vitaly Takmazov | 2013-11-03 06:08:35 +0400 |
---|---|---|
committer | Vitaly Takmazov | 2013-11-03 06:08:35 +0400 |
commit | 08574251153406e4755f58c2ee5548ee32e308fb (patch) | |
tree | 26325a6adace092e919234064b0446c3a80812a1 /Juick/MasterViewController.m | |
parent | 6dfbafe71aba41bdcf8aba331c1c193c88b42561 (diff) |
avatars
Diffstat (limited to 'Juick/MasterViewController.m')
-rw-r--r-- | Juick/MasterViewController.m | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Juick/MasterViewController.m b/Juick/MasterViewController.m index 26035cd..4ed8df1 100644 --- a/Juick/MasterViewController.m +++ b/Juick/MasterViewController.m @@ -127,6 +127,7 @@ static NSString *CellIdentifier = @"MessageCell"; MessageCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath]; [cell updateFonts]; Message *msg = [_messages objectAtIndex:indexPath.row]; + [cell.avatar setImage:[UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://i.juick.com/as/%@.png", msg.userID]]]]]; cell.titleLabel.text = msg.user; cell.bodyLabel.text = msg.text; [cell setNeedsUpdateConstraints]; @@ -136,11 +137,13 @@ static NSString *CellIdentifier = @"MessageCell"; - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { + MessageCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; [cell updateFonts]; Message *msg = [_messages objectAtIndex:indexPath.row]; + [cell.avatar setImage:[UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://i.juick.com/as/%@.png", msg.userID]]]]]; cell.titleLabel.text = msg.user; cell.bodyLabel.text = msg.text; |