1. Objective C / Говнокод #17947

    −425

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 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;
    	}

    Мастерское владение размерами

    Запостил: shadeapps, 06 Апреля 2015

    Комментарии (156) RSS

    Добавить комментарий