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

【代码笔记】替换电话号码中间4位为

一,效果图。

【代码笔记】替换电话号码中间4位为images/loading.gif' data-original="http://images2015.cnblogs.com/blog/337518/201510/337518-20151020151639192-707434923.jpg" width="218" height="400" />

二,代码。

RootViewController.m

【代码笔记】替换电话号码中间4位为
- (void)viewDidLoad{  [super viewDidLoad];  // Do any additional setup after loading the view.    //电话号码  UILabel *telLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 100, 200, 20)];  telLabel.textColor = [UIColor grayColor];  telLabel.text = @"13793333281";  //字符串的截取  NSString *string = [telLabel.text substringWithRange:NSMakeRange(4,4)];  //字符串的替换  telLabel.text = [telLabel.text stringByReplacingOccurrencesOfString:string withString:@"----"];  [self.view addSubview:telLabel];}
【代码笔记】替换电话号码中间4位为

 

 


 

原标题:【代码笔记】替换电话号码中间4位为

关键词:

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

干货:从A9算法来看亚马逊站外流量:https://www.ikjzd.com/articles/104884
邮件模板分享:与买家沟通必经的四个阶段!:https://www.ikjzd.com/articles/104885
你的店铺适合做站外推广吗?站外推广的思路是什么?:https://www.ikjzd.com/articles/104886
做亚马逊,如果你连KYC审核都没过,还奢谈做什么大卖!!:https://www.ikjzd.com/articles/104888
关于产品的外观专利,卖家必知!:https://www.ikjzd.com/articles/104889
Expert Recommendations另辟蹊径上首页:https://www.ikjzd.com/articles/10489
在古巴做游轮 古巴旅游项目:https://www.vstour.cn/a/363194.html
西藏旅游攻略自驾游需要多少天 去西藏旅游自驾游要多久时间:https://www.vstour.cn/a/363195.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流