- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
[self.userView sd_setImageWithURL:[comment.sender avatarThumbnailURL] placeholderImage:[UIImage coloredAvatarWithId:[NSString stringWithFormat:@"%lld", comment.sender.idValue]
andName:comment.sender.firstName
ofSize:CGSizeMake (57, 57)]];
self.dateLabel.text = [self tsFromDate:comment.createdAt];
[self.dateLabel sizeToFit];
if (comment.sender == [SWCore account])
{
self.balloonImage.image = [[UIImage imageNamed:@"in_baloon"] resizableStretchedImageWithCapInsets:UIEdgeInsetsMake (20, 50, 20, 50)];
self.messageLabel.textColor = [UIColor colorWithWhite:.4f alpha:1.0f];
self.userView.left = 20;
self.balloonImage.right = 300;
self.dateLabel.right = self.balloonImage.right;
self.dateIcon.right = self.dateLabel.left - 3;
}
else
{
self.balloonImage.image = [[UIImage imageNamed:@"out_baloon"] resizableStretchedImageWithCapInsets:UIEdgeInsetsMake (20, 50, 20, 50)];
self.messageLabel.textColor = [UIColor whiteColor];
self.userView.right = 300;
self.balloonImage.left = 20;
self.dateIcon.left = self.balloonImage.left;
self.dateLabel.left = self.dateIcon.right + 3;
}