iOStextview排版
- (IBAction)changeText:(id)sender {
创新互联公司-专业网站定制、快速模板网站建设、高性价比黎城网站开发、企业建站全套包干低至880元,成熟完善的模板库,直接使用。一站式黎城网站制作公司更省心,省钱,快速模板网站建设找我们,业务覆盖黎城地区。费用合理售后完善,10多年实体公司更值得信赖。
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
paragraphStyle.alignment = NSTextAlignmentCenter;
paragraphStyle.paragraphSpacing = 12.0f;
NSMutableDictionary *attributes = [NSMutableDictionary dictionary];
attributes[NSParagraphStyleAttributeName] = paragraphStyle;
attributes[NSFontAttributeName] = [UIFont fontWithName:@"Futura" size:20.0f];
attributes[NSForegroundColorAttributeName] = [UIColor colorWithRed:1.0f green:0 blue:0 alpha:1.0f];
NSAttributedString *attriStr = [[NSAttributedString alloc] initWithString:self.mytextView.text attributes:attributes];
self.mytextView.attributedText = attriStr;
}
网站栏目:iOStextview排版
网站网址:http://hbruida.cn/article/ihpihs.html