drawRect over subviews?

前端 未结 3 546
没有蜡笔的小新
没有蜡笔的小新 2021-01-12 17:42

I created a container view that holds a bunch of child views - a collection view, a custom toolbar and some bits and pieces.

The design has a border on the top, lef

3条回答
  •  逝去的感伤
    2021-01-12 18:29

    I believe you can't, since the drawRect is called first for the view and when it has finished drawing drawRect is called for subviews to draw over it. Maybe just make another subview on top of that view that has the borders you need and is transparent everywhere else?

提交回复
热议问题