【问题标题】:How to make part of a textView text bigger and bold?如何使 textView 文本的一部分更大更粗?
【发布时间】:2012-07-23 00:35:21
【问题描述】:

我什至不知道如何使所有 textView 加粗,但我想知道如何使整个文本中的一个单词像标题一样(更大更粗)。

mytextview.text = @"Title \n text text text text";  

//I want the "Title" to be bigger and bold

【问题讨论】:

标签: objective-c ios xcode cocoa-touch


【解决方案1】:

您需要使用属性字符串并使用核心文本框架进行渲染。stackoverflow discussion 或者你可以使用 cocoanetics 核心文本组件DTCoreText

【讨论】:

    猜你喜欢
    • 2017-01-23
    • 1970-01-01
    • 2017-05-22
    • 1970-01-01
    • 1970-01-01
    • 2017-06-24
    • 2012-08-18
    • 1970-01-01
    • 2016-02-19
    相关资源
    最近更新 更多