NSMutableAttributedString

public extension NSMutableAttributedString
  • 富文本

    Declaration

    Swift

    func add(attrs: [FontAttribute])

    Parameters

    attrs

    attrs description let attributedString = NSMutableAttributedString() attributedString.add(attrs: [(“红鸡蛋 价格: 100”, UIColor.red, font12), (“黄鸡蛋 价格 90 \n”, UIColor.red, font12)])