Skip to content

Instantly share code, notes, and snippets.

Omkar ARomkAR

  • Still On earth :P
View GitHub Profile
View AttributedString
NSMutableAttributedString * dicsAttr = nil;
NSMutableString *dics = nil;
dics = [NSMutableString stringWithFormat:@"%@",str1];
[dics appendFormat:@"\nPrice:\t%@",str2];
dicsAttr = [[NSMutableAttributedString alloc] initWithString:dics];
[dicsAttr addAttribute:NSFontAttributeName value:[UIFont HelveticaFontOfSize:30] range:[dics rangeOfString:str1]];
[dicsAttr addAttribute:NSFontAttributeName value:[UIFont HelveticaFontOfSize:30.0] range:[dics rangeOfString:@"Price:"]];
[dicsAttr addAttribute:NSFontAttributeName value:[UIFont HelveticaFontOfSize:30.0] range:[dics rangeOfString:str2]];
You can’t perform that action at this time.