<pre>NSMutableParagraphStyle* style = [[NSMutableParagraphStyle alloc] init];
[style setAlignment:UITextAlignmentCenter];
NSDictionary *attr = @{NSParagraphStyleAttributeName:style, NSFontAttributeName: [UIFont systemFontOfSize:10], NSForegroundColorAttributeName:[UIColor colorWithHexString:@"333333"]};
[rateStr drawInRect:frame withAttributes:attr];</pre>
网友评论