Open plandem opened 10 years ago
Well, i'm using attributed string to style complex string - some words bold, some - differ font, but i can't understand how to style it with Pixate?! :(
NSString text = [NSString stringWithFormat:@"Total time\n%@", formatTimeInterval(total_seconds)]; UIFont font_b = [UIFont fontWithName: APP_FONT size:26]; UIFont *font_s = [UIFont systemFontOfSize:14];
NSMutableAttributedString *label = [[NSMutableAttributedString alloc] initWithString:text]; NSRange width = [[label string] rangeOfString:@"\n"];
[label addAttribute:NSFontAttributeName value:font_s range:NSMakeRange(0, width.location)]; [label addAttribute:NSFontAttributeName value:font_b range:NSMakeRange(width.location, [label length] - width.location)];
here i have one attributed string with few styles - each line has own style.
Well, i'm using attributed string to style complex string - some words bold, some - differ font, but i can't understand how to style it with Pixate?! :(
Is it possible to do something like this?
NSString text = [NSString stringWithFormat:@"Total time\n%@", formatTimeInterval(total_seconds)]; UIFont font_b = [UIFont fontWithName: APP_FONT size:26]; UIFont *font_s = [UIFont systemFontOfSize:14];
NSMutableAttributedString *label = [[NSMutableAttributedString alloc] initWithString:text]; NSRange width = [[label string] rangeOfString:@"\n"];
[label addAttribute:NSFontAttributeName value:font_s range:NSMakeRange(0, width.location)]; [label addAttribute:NSFontAttributeName value:font_b range:NSMakeRange(width.location, [label length] - width.location)];