I am trying to decrease the size of a portion of my string and am using the below code. My output is not correct. I am only seeing my first font attribute being used for the entire string, not the specified range.
NSMutableAttributedString *attString=[[NSMutableAttributedString alloc] initWithString:title];
NSInteger _stringLength=[descriptionText length];
[attString addAttribute:NSFontAttributeName
value:[UIFont fontWithName:@"Gotham-Bold" size:20.0]
range:NSMakeRange(0, 10)];
[attString addAttribute:NSFontAttributeName
value:[UIFont fontWithName:@"Helvetica-Bold" size:12.0]
range:NSMakeRange(11, _stringLength-1)];
[self.description setAttributedText:attString];
There is nothing wrong with your code. Possibly you are trying to use font names that don't exist. Did you check that the fonts actually exist, e.g. by po or NSLog?
What's the output if you log the attributedString?