UIView Round Corners with Shadow

前端 未结 3 1825
误落风尘
误落风尘 2020-12-31 05:22

I am trying to display a UIView with round corners and with a drop shadow. But the problem is that maskToBounds property only works for either of the case.

If maskT

3条回答
  •  盖世英雄少女心
    2020-12-31 05:50

    Create two views. one with the drop shadow (and don't forget to set the shadowPath) in which you add a subview with cornerRadius and maskToBounds.

提交回复
热议问题