Skip to content

Instantly share code, notes, and snippets.

@haric
Created August 3, 2012 14:35
Show Gist options
  • Select an option

  • Save haric/3248178 to your computer and use it in GitHub Desktop.

Select an option

Save haric/3248178 to your computer and use it in GitHub Desktop.
Different fonts in one label
CGContextRef context = UIGraphicsGetCurrentContext();
// ERASE BACKGROUND
CGContextSetRGBStrokeColor(context, 0.0, 0.0, 0.0, 1.0);
CGContextSetRGBFillColor(context, 0.0, 0.0, 0.0, 1.0);
CGContextFillRect(context, rect);
// DRAW TEXT
[[UIColor whiteColor] set];
UIFont * font = [UIFont fontWithName:@"ArialMT" size:12];
[@"TEST String" drawAtPoint:CGPointMake(0,70) withFont:font];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment