I would like to display text with another color in it’s border (outline).
i’m trying to display a text in MapOverlayView using
[text drawAtPoint:CGPointMake(0,30) withFont:[UIFont fontWithName:@"Helvetica-Bold" size:(3 * MKRoadWidthAtZoomScale(zoomScale))]
it works fine except I need text to be displayed outlines.
Yes, you can display outlined text with the aid of
CGContextSetDrawingMode(CGContextRef, CGTextDrawingMode), although you’ll probably need to adjust some numbers and colors to make it look good.It make seem logical to use kCGTextFillStroke, but that can make the stroke overwhelm the fill. If you stroke, then fill, as in the block below, you get a visible outline behind readable text.