Sí, puede mostrar el texto contorneado con la ayuda de CGContextSetDrawingMode(CGContextRef, CGTextDrawingMode)
, aunque es probable que deba ajustar algunos números y colores para que se vea bien.
Parece lógico usar kCGTextFillStroke, pero eso puede hacer que el trazo desborde el relleno. Si acaricias, luego llenas, como en el bloque de abajo, obtienes un contorno visible detrás del texto legible.
CGContextRef context = UIGraphicsGetCurrentContext();
CGPoint point = CGPointMake(0,30);
CGFloat fontSize = (3 * MKRoadWidthAtZoomScale(zoomScale));
UIFont *font = [UIFont fontWithName:@"Helvetica-Bold" size:fontSize];
// Draw outlined text.
CGContextSetTextDrawingMode(context, kCGTextStroke);
// Make the thickness of the outline a function of the font size in use.
CGContextSetLineWidth(context, fontSize/18);
CGContextSetStrokeColorWithColor(context, [[UIColor redColor] CGColor]);
[text drawAtPoint:point withFont:font];
// Draw filled text. This will make sure it's clearly readable, while leaving some outline behind it.
CGContextSetTextDrawingMode(context, kCGTextFill);
CGContextSetFillColorWithColor(context, [[UIColor blueColor] CGColor]);
[text drawAtPoint:point withFont:font];
Muchas gracias ... funcionó muy bien !! – user836026
no funciona en mi caso, seguí los mismos pasos –