Duas cores para UILabel TEXT
Eu quero definir duas cores paraUILabel's
texto. eu tenteiTTTRegexAttributedLabel
, mas está jogando erro de tipo desconhecido.
Eu tentei seguir o código também. Mas está falhando em settext.
NSMutableAttributedString *str = [[NSMutableAttributedString alloc] initWithString:@"Hello. That is a test attributed string."];
[str addAttribute: @"Hello" value:[UIColor yellowColor] range:NSMakeRange(3,5)];
[str addAttribute:@"That" value:[UIColor greenColor] range:NSMakeRange(10,7)];
[str addAttribute:@"Hello" value:[UIFont fontWithName:@"HelveticaNeue-Bold" size:20.0] range:NSMakeRange(20, 10)];
[syncStatusLabel setText:(NSString *)str];
Existe alguma outra maneira de definir várias cores para um único texto UILabel?