What you want can be achieved using Quartz 2D . You can see this sample code provided by Apple. You can also read Documentation .
Choose a font:
UIFont *font = [UIFont fontWithName:@"Arial" size:14]; CGPoint point = CGPointMake(0,0);
Get current context:
CGContextRef context = UIGraphicsGetCurrentContext();
Set fill color and stroke color:
CGContextSetRGBFillColor(context, [[UIColor whiteColor] CGColor]); CGContextSetRGBStrokeColor(context, [[UIColor blackColor] CGColor]);
Set text drawing mode:
CGContextSetTextDrawingMode(context, kCGTextFillStroke);
Save state:
CGContextSaveGState(context); [@"White Font With Black Border?" drawAtPoint:point withFont:font]; CGContextRestoreGState(context);
source share