29,027
社区成员
发帖
与我相关
我的任务
分享
nameLabel1.lineBreakMode = NSLineBreakByCharWrapping;
nameLabel1.attributedText = [[NSAttributedString alloc] initWithString:@"丁丁丁丁丁丁丁丁丁丁丁丁丁丁丁丁丁丁丁丁丁丁丁丁丁丁丁丁wwwwwwwwwwwwwwww丁" attributes:textAttributes];
UIFont* font = [UIFont systemFontOfSize:14.f];
NSMutableParagraphStyle* style = [[NSParagraphStyle defaultParagraphStyle] mutableCopy];
style.alignment = self.userSelectedTextAlignment;
style.lineBreakMode = NSLineBreakByCharWrapping;
NSMutableDictionary* textAttributes = [NSMutableDictionary dictionaryWithObjectsAndKeys:font, NSFontAttributeName
, style, NSParagraphStyleAttributeName
, [UIColor blackColor], NSForegroundColorAttributeName, nil];