How can i underline text inside uitextview programmatically?
NSMutableAttributedString *attributedString = [self.textView.attributedText mutableCopy];
int valueToSet = kCTUnderlineStyleSingle;
[attributedString addAttribute:NSUnderlineStyleAttributeName value:[NSNumber numberWithInt:valueToSet] range:CGMakeRange(0, self.textView.text.length)];
self.textView.attributedText = attributedString;
[attributedString release];