This question already has an answer here:
- Best way to strike out a text 2 answers
I would like to know if there is an easy way to strike/cross out some text on the iPhone?
Thanks
This question already has an answer here:
I would like to know if there is an easy way to strike/cross out some text on the iPhone?
Thanks
Yes and No,
NSString is a simple class, that only stores unformated text, but you can use an NSAttributedString to store such information, i.e.
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 ;