let someValue : String = "Something the user entered" let text = NSMutableAttributedString(string: "值是: ") text.appendAttributedString(NSAttributedString(string: someValue, attributes: [NSFontAttributeName:UIFont.boldSystemFontOfSize(UIFont.systemFontSize())]))
结果看起来像:
值是:用户输入的内容