drawRect over subviews?

前端 未结 3 544
没有蜡笔的小新
没有蜡笔的小新 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:41

    Subviews are drawn on top of their super views. So the answer to your question is no.

    At the time when you draw the border on your container view, Cocoa hasn't even started drawing the toolbar yet.

    I guess you could make the top of the border a subview or move the toolbar down a bit.

提交回复
热议问题