HDd*_*per 10
在iOS 6中,我们可以使用"NSMutableAttributedString"来使用更多不同的样式.
NSString* cutText = @"This Line is strike out.";
NSMutableAttributedString *titleString = [[NSMutableAttributedString alloc] initWithString:cutText];
// making text property to strike text- NSStrikethroughStyleAttributeName
[titleString addAttribute:NSStrikethroughStyleAttributeName value:[NSNumber numberWithInteger:NSUnderlineStyleSingle] range:NSMakeRange(0, [titleString length])];
// using text on label
[myTextLabel setAttributedText:titleString];
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
8379 次 |
| 最近记录: |