How do I set my MKOverlay's opacity to full?
How can I alter the opacity of my MKOverlay?
It is currently see-through - which I do开发者_如何学运维n't want.
I have found deep into the references how to do it:
In TileMap example one draws stuff in drawMapRect:zoomScale:inContext
.
In there is the following line:
CGContextSetAlpha(context, tileAlpha);
The variable tileAlpha
is what you need to set.
This is what the reference said:
A value that specifies the opacity level. Values can range from 0.0 (transparent) to 1.0 (opaque). Values outside this range are clipped to 0.0 or 1.0.
Hope this helps someone in the future.
精彩评论