I am trying to underline some text in a label. However, I do\'t know how to get the range of the entire text in the label. This is what I have so far:
NSMuta
For the range you may want to use:
NSMakeRange (0, mat.length);
Like this:
NSMutableAttributedString *mat = [self.tableLabel.attributedText mutableCopy];
[mat addAttributes:@{NSUnderlineStyleAttributeName: @(NSUnderlineStyleSingle)} range:NSMakeRange (0, mat.length)];
self.tableLabel.attributedText = mat;