添加刪除線:
NSMutableAttributedString * discount = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"¥%@",discountStr] attributes:
@{NSFontAttributeName : [UIFont jk_systemFontOfPxSize:30],
NSForegroundColorAttributeName : JKSameRGBColor(153),
NSStrikethroughStyleAttributeName:@(NSUnderlineStyleDouble),
NSStrikethroughColorAttributeName : [UIColor yellowColor]
其中:NSStrikethroughStyleAttributeName 刪除線
實際上,設置刪除線 NSStrikethroughColorAttributeName 的時候,值也是這個枚舉。
// NSUnderlineStyleNone 不設置下劃線/刪除線
// NSUnderlineStyleSingle 設置下劃線/刪除線為細的單線
// NSUnderlineStyleThick 設置下劃線/刪除線為粗的單線
// NSUnderlineStyleDouble 設置下劃線/刪除線為細的雙線
// NSUnderlinePatternSolid 設置下劃線/刪除線樣式為連續(xù)的實線
//NSUnderlinePatternDot 設置下劃線/刪除線樣式為點,也就是虛線,比如這樣:------
// NSUnderlinePatterDash 設置下劃線/刪除線樣式為破折號,比如這樣:—— —— ——
// NSUnderlinePatternDashDot 設置下劃線/刪除線樣式為連續(xù)的破折號和點,比如這樣:——-——-——-
// NSUnderlinePatternDashDotDot 設置下劃線/刪除線樣式為連續(xù)的破折號、點、點,比如:——--——--——--
// NSUnderlineByWord 在有空格的地方不設置下劃線/刪除線
當 : ¥ 和 100 組合 時 ,刪除線出現(xiàn)斷層,不水平現(xiàn)象

當我用$符號時,發(fā)現(xiàn)沒問題,所以我猜測是 中英文 結合問題

上面的是 直接 快捷鍵shift + 4 打得 符號,有斷層
下面是 用 搜狗 打“RMB”選的符號,沒有斷層
