This is in reference to OHAttributedLabel numberOfLines issue. I have created an OHAttributedLabel and on setting attributedText I get a crash in my application. The text to be displayed on label may be be of multiple lines as it is coming from server.
What is the solution for this?
NSMutableAttributedString* attrStr = [NSMutableAttributedString attributedStringWithString:string];
[attrStr setTextColor:[UIColor colorWithRed:0.f green:0.f blue:0.5 alpha:1.f] range:[string rangeOfString:matchingStringPhone]];
label.attributedText = attrStr;
Getting crash in second line.
Compiler should warn you there is no setTextColor:range: method in class NSMutableAttributedString.
My is doing so at least.
Your?
May be you want to call
– (void)setAttributes:(NSDictionary *)attributes range:(NSRange)aRange
???