NSMutableAttributedString's attribute NSStrikethroughStyleAttributeName doesn't work correctly in iOS8

后端 未结 6 1204
猫巷女王i
猫巷女王i 2020-12-31 21:36

I have a mutable attributed string without NSStrikethroughStyleAttributeName attribute like this:

NSMutableAttributedString *str1 = [[NSMutableAttributedStri         


        
6条回答
  •  情深已故
    2020-12-31 21:55

    When you add NSStrikethroughStyleAttributeName, you should also add NSBaselineOffsetAttributeName, which is set to 0. And in swift, you should use the rawValue of NSUnderlineStyle.

提交回复
热议问题