开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜