UITextVIEw *textVIEw = [[UITextVIEw alloc] initWithFrame:CGRectMake(50,50,200,100)];textVIEw.text = @"Vijay Apple Dev";Nsstring *textVIEwText = textVIEw.text;NSMutableAttributedString *attributedText = [[NSMutableAttributedString alloc] initWithString:textVIEwText];[attributedText addAttribute:NSFontAttributename value:[UIFont FontWithname:@"CourIEr" size:20] range:[textVIEwText rangeOfString:@"Apple"]];[attributedText addAttribute:NSFontAttributename value:[UIFont FontWithname:@"Verdana" size:20] range:[textVIEwText rangeOfString:@"Vijay"]];textVIEw.attributedText = attributedText;[self.vIEw addSubvIEw:textVIEw];总结
以上是内存溢出为你收集整理的如何在ios中的textView中显示不同字体的文本?全部内容,希望文章能够帮你解决如何在ios中的textView中显示不同字体的文本?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)