iOS clipsToBounds YES and Shadow?

后端 未结 1 1992
甜味超标
甜味超标 2021-01-24 18:49

I have a UITableView that is kind of floating, and has rounded corners and a set height. But I want to add a shadow too it, but my problem is I need to have clipsToBounds<

1条回答
  •  粉色の甜心
    2021-01-24 19:31

    I'd recommend putting the UITableView within a UIView of the same size so you can maintain clipsToBounds on the UITableView but give that UIView superview the shadow so it looks as if the UITableView subview is casting that shadow.

    0 讨论(0)
提交回复
热议问题