Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NSMutableAttributedString *myString = [[NSMutableAttributedString alloc]
- initWithString:[NSString stringWithFormat:@"Hi, this is a test code for an example"]];
- [myString addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:20.0] range:NSMakeRange(20, 4)];
- Option 2 (how to do this):
- NSString *message = @"This is the the part of the code that I want to be size 20.0";
- NSMutableAttributedString *myString = [[NSMutableAttributedString alloc]
- initWithString:[NSString stringWithFormat:@"Hi, this is a test %@ for an example", message]];
- [myString addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:20.0] range:?????];
Advertisement
Add Comment
Please, Sign In to add comment