Label/String 字符串中间加一条横线

lease try again.]
先要Label..attributedText执行赋值
NSDictionary *attribtDic = @{NSStrikethroughStyleAttributeName: [NSNumber numberWithInteger:NSUnderlineStyleSingle]};
NSMutableAttributedString *attribtStr = [[NSMutableAttributedString alloc]initWithString: @"中划线" attributes:attribtDic];
_lable1.attributedText = attribtStr;
Label/String 字符串中间加下划线
SDictionary *attribtDic2 = @{NSStrikethroughStyleAttributeName: [NSNumber numberWithInteger:NSUnderlineStyleSingle]};
NSMutableAttributedString *attribtStr2 = [[NSMutableAttributedString alloc]initWithString:@"下划线" attributes:attribtDic2];
_lable2.attributedText = attribtStr2;
网友评论