I want to use exchangeSubviewAtIndex: withSubviewAtIndex: method.
but how can i get the indexes of those views? i already have their pointers, so I
This is how you get it:
[parentView.subviews indexOfObject:subview];
In Swift:
parentView.subviews.firstIndex(of: subview)