How can I bring a view in front of another view, in Swift?

前端 未结 5 744
没有蜡笔的小新
没有蜡笔的小新 2020-12-16 10:37

Below are how my views are organized in IB, top->bottom when the app is started.

The user can do something to make \"Category Table View Header\" temporarily expand

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-16 11:28

    You can take a control over the order of subviews using methods: bringSubviewToFront and sendSubviewToBack from the superview.

    You can access all the subviews contained by superview using self.view.subview array.

提交回复
热议问题