I only managed to do so If I set cornerRadius property to the layer I want to mask.
I am trying to achieve:
[blueView.layer addSublayer:redLayer]
Now I would like to have only red border (redLayer) and middle would be blue (because blueView is blue). This blue part is size/shape of maskLayer (and is transparent so thats why I should see blue color).
Am I on a right track here?
maskLayer
must have some color set on it.