//电话号码
UILabel
*telLabel = [[
UILabel
alloc
]
initWithFrame
:CGRectMake(
1
0
, yy+
3
0
,
2
0
0
,
2
0
)];
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];