目标 C 中的删除线字体 [英] Strike-through font in objective C

查看:20
本文介绍了目标 C 中的删除线字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在目标 C 中使用删除线字体???更具体地说,在 UITableViewCell

How can I use strike-through font in objective C??? More specifically in UITableViewCell

cell.textLabel.text = name;
cell.detailTextLabel.text = quantity ;
cell.XXX = ??

推荐答案

此答案自 iOS 6 起已过时.请参阅下面的最新答案

没有对删除线或下划线字体的原生支持.您必须自己在标签的视图上绘制线条.

There is not native support for strike-through or underline fonts. You have to draw the lines yourself over the views for the labels.

这很愚蠢,因为 IB 的字体检查器有设置删除线和下划线的选项,但是如果您尝试设置它们,这些选项会立即被忽略.

This is silly since the font inspector for IB has options to set strike-through and underline, but these are promptly ignored if you try to set them.

这篇关于目标 C 中的删除线字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆