IPhone. Create a translucent rectangle with opaque text.

I have a MapView and I want to display a black translucent rectangle on top with text inside. Not all of the map is only part of it (possibly in the upper corner), as is the information window (for example, one in the iPod, which appears when you double-click and displays the Mute and skip buttons).

I tried Google, but I don't have clear answers. What is the best way to do this?

Thanks in advance

+7
source share
1 answer

Can be easily done using the interface constructor:

enter image description here

View hierarchy

NOTE The background must be a separate view, which is the first entry in the list of controls, so it is in the background. Setting the container view to an alpha value below 1 will also be inherited by subzones that are not displayed in the interface builder

enter image description here

Options for viewing "with clear color bg and alpha 1.0"

enter image description here

Settings for viewing "black translucent viewing bg"

enter image description here

+22
source

All Articles