In my application - there are four buttons named as follows:
Abov
See this related question. You'll have to draw your own rectangle to a CGPath
with some rounded corners, add the CGPath
to your CGContext
and then clip to it using CGContextClip
.
You can also draw the rounded rect with alpha values to an image and then use that image to create a new layer which you set as your layer's mask
property (see Apple's documentation).