iPhone- nsStringをストライキ[複製
-
01-10-2019 - |
質問
解決
はいといいえ、
NSStringは、形成されていないテキストのみを保存する単純なクラスですが、NSATTRIBTEDSTRINGを使用してそのような情報を保存できます。
NSAttributedString* italicText = [[NSAttributedString alloc] initWithString:myNsString attributes:myCrossOutAttributes];
他のヒント
NSMutableAttributedString *strikeThroughString = [[NSMutableAttributedString alloc] initWithString:anyString];
[strikeThroughString addAttribute:NSStrikethroughStyleAttributeName value:(NSNumber *)kCFBooleanTrue range:NSMakeRange(0, [as length])];
[m_cObjTaskTitle setAttributedText:strikeThroughString =];
cObjTaskTitle = UILabel ;
所属していません StackOverflow