标签:
NSString * str = @"ABCDEFG HIJKLMN";
UILabel * aLab = [[UILabel alloc]initWithFrame:CGRectMake(10, 100, 300, 300)];
aLab.text = str;
NSMutableAttributedString * testAttriString = [[NSMutableAttributedString alloc] initWithString:str];
[testAttriString addAttribute:NSStrikethroughStyleAttributeName value:[NSNumber numberWithInt:NSUnderlineStyleSingle] range:NSMakeRange(0, testAttriString.length)];
aLab.attributedText = testAttriString;
[self.view addSubview:aLab];
标签:
原文地址:http://www.cnblogs.com/zgfblog/p/4178845.html