2016-03-04 93 views
2

我在设置文本字体的字体时遇到问题。我做了一个大胆的按钮。点击粗体按钮后,整个文本字段字符串字体设置为粗体。但我只想要那些在按下粗体按钮后变得粗体的文字。如何在点击粗体按钮后更改文本字体的字体

enter image description here

+0

你应该使用'NSMutableAttributedString' – techloverr

+0

NSAttributedString * strAttributedTitle = [[NSAttributedString页头] initWithString:<添加哪些点击大胆的按钮后,进入你的字符串>属性:@ {NSForegroundColorAttributeName :[UIColor darkGrayColor],NSFontAttributeName:[UIFont fontWithName:@“Helvetica-Bold”size:15.0f]}]; –

回答