UILabel Strikethrough

前端 未结 5 1874
孤城傲影
孤城傲影 2020-12-30 07:26

Is it possible to stikethrough a UILabel at all? I can\'t seem to find the option...

5条回答
  •  轮回少年
    2020-12-30 07:51

    iPhone doesn't support attributed strings (which is usually the way you'd do this in Cocoa), so I don't believe it's possible.

    You could subclass UILabel and draw the strikethrough yourself. I've also seen some people use a UIWebView to do this type of thing, but that seems like overkill to me.

提交回复
热议问题