星空网 > 软件开发 > 操作系统

【代码笔记】创建具有中划线的文字

一, 效果图。

【代码笔记】创建具有中划线的文字images/loading.gif' data-original="http://images2015.cnblogs.com/blog/337518/201510/337518-20151013134135147-2123130690.jpg" width="218" height="400" />

二,工程图。

【代码笔记】创建具有中划线的文字

三,代码。

RootViewController.h

RootViewController.m

【代码笔记】创建具有中划线的文字
- (void)viewDidLoad{  [super viewDidLoad];    //UILabel  UILabel *label=[[UILabel alloc]initWithFrame:CGRectMake(50, 100, 200, 200)];  label.backgroundColor=[UIColor redColor];  [self.view addSubview:label];    //显示下划线  NSDictionary *attribtDic = @{NSStrikethroughStyleAttributeName: [NSNumber numberWithInteger:NSUnderlineStyleSingle]};  NSMutableAttributedString *attribtStr = [[NSMutableAttributedString alloc]initWithString:@" 价格:40" attributes:attribtDic];  label.attributedText = attribtStr;}
【代码笔记】创建具有中划线的文字

 




原标题:【代码笔记】创建具有中划线的文字

关键词:

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

专有名词:https://www.goluckyvip.com/tag/10122.html
比较便宜的国际快运:https://www.goluckyvip.com/tag/101220.html
长明国际物流:https://www.goluckyvip.com/tag/101221.html
国际寄递物流:https://www.goluckyvip.com/tag/101222.html
国际国际物流:https://www.goluckyvip.com/tag/101223.html
吉达国际物流:https://www.goluckyvip.com/tag/101224.html
月活用户超20亿!万亿市值巨头对中国商家进一步开闸放流 :https://www.kjdsnews.com/a/1836412.html
九寨沟周围必去的景点推荐:https://www.vstour.cn/a/363190.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流