I\'m trying to draw some circle overlays containing text on MKMapView. I have subclassed the MKCircleView, in which I put the following (based on this), but the text does no
It is most likely that your text is drawn to a rectangle which is not visible.
First thing I would do is try printing the values as %f instead of %lf, as those values look crazy. You should also print out the .size.width
and .size.height
for the two rects (mapRect
and overallCGRect
).
If that doesn't lead you to a sensible rectangle definition, then try defining a CGRect yourself like CGRectMake(0,0,100,20)
and see if the text draws.
You can also try simply drawing a filled rectangle to the same overallCGRect
that you are drawing your text into.