NSStrikethroughStyleAttributeName , How to strike out the string in iOS 10.3?

后端 未结 7 1972
长情又很酷
长情又很酷 2020-12-07 01:38

I have used this line of code before release of iOS 10.3 ,and worked fine.

NSMutableAttributedString *attributeString = [[NSMutableAttributedString alloc] in         


        
7条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-07 02:40

    As mentioned above, this is an iOS 10.3 bug.

    We needed an immediate workaround, so just in case anyone is looking for hints: Our Label had attributes set through both NSMutableAttributedString as well as NSMutableParagraphStyle. The bug did not occur when using no / an "empty" paragraph style (instance without any properties set).

    So in this scenario, omitting the paragraph style and working around the then missing paragraph properties resolved the issue for us.

提交回复
热议问题