NSString *basic = [NSString stringWithFormat:@"%@ \uFFFC", up.name];
NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:basic attributes:@{NSFontAttributeName : v.name.font, NSForegroundColorAttributeName : v.name.textColor}];
NSTextAttachment *attach = [[NSTextAttachment alloc] init];
if ([up.gender isEqualToNumber:@(1)])
{
attach.image = [UIImage imageNamed:@"global-male"];
}
else
{
attach.image = [UIImage imageNamed:@"global-female"];
}
attach.bounds = CGRectMake(0.0f, - 1.0f, attach.image.size.width, attach.image.size.height);
NSRange range = NSMakeRange(basic.length - 1, 1);
[attr addAttribute:NSAttachmentAttributeName value:attach range:range];
v.name.attributedText = attr;