目标C中的穿透字体 [英] Strike-through font in objective C

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

问题描述

如何在目标C中使用透视字体?更具体地说,在UITableViewCell中

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


解决方案

编辑:此答案已过期从iOS 6开始。请参阅下面最近的答案



原生支持直通或下划线字体。你必须自己在标签的视图上画线。



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


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

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

解决方案

EDIT: This answer is out of date as of iOS 6. Please see the more recent answers below

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

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天全站免登陆