GJain
GJain

Reputation: 5093

Re-order subviews in a full view

However, removing and adding subviews create a performance problem

So, I was hoping to re-order subviews on button press rather than removing them.

How can I re-order stacked subviews?

Upvotes: 1

Views: 225

Answers (1)

ndmeiri
ndmeiri

Reputation: 5029

You can reorder subviews by calling the following two methods:

parentView.bringSubviewToFront(subview)

or

parentView.sendSubviewToBack(subview)

Upvotes: 2

Related Questions