1

我想知道是否有一种简单的方法可以在 iPhone 上删除/删除一些文本?

谢谢

4

2 回答 2

3
NSMutableAttributedString *strikeThroughString = [[NSMutableAttributedString alloc] initWithString:anyString];
[strikeThroughString addAttribute:NSStrikethroughStyleAttributeName value:(NSNumber *)kCFBooleanTrue range:NSMakeRange(0, [as length])];
[m_cObjTaskTitle setAttributedText:strikeThroughString =];
cObjTaskTitle = UILabel ;
于 2012-10-10T08:32:05.497 回答
2

是与否,

NSString 是一个简单的类,它只存储无格式的文本,但是你可以使用一个 NSAttributedString 来存储这样的信息,即

NSAttributedString* italicText = [[NSAttributedString alloc] initWithString:myNsString attributes:myCrossOutAttributes];
于 2010-04-25T15:55:30.773 回答