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
必须设置一些颜色。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.