- 此方法适用于textFiled的占位字符
- textView
- UILabel
- UIButton需要文字的地方都可以
func FuWenBen() -> NSMutableAttributedString { //定义富文本即有格式的字符串 let attributedStrM : NSMutableAttributedString = NSMutableAttributedString() // 左上角星星 let xingxing = NSAttributedString.init(string: "*", attributes: [NSAttributedString.Key.backgroundColor : UIColor.black , NSAttributedString.Key.foregroundColor : UIColor.red , NSAttributedString.Key.font : UIFont.boldSystemFont(ofSize: 20) ,NSAttributedString.Key.baselineOffset : (20)]) let wo = NSAttributedString.init(string: "我", at