UILabel Strikethrough

前端 未结 5 1873
孤城傲影
孤城傲影 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:43

    You could create another UILabel above your label and use an en dash character:

    label.text = @"––––––––––––––––––";
    

    Caveat: works with Helvetica (system default). It may not work with other fonts.

提交回复
热议问题