I would like to sort an NSMutableArray of UIViews according to their frame.origin.y, I want the lowest view with y to be first etc. It can be the case that 2 UIViews have the same origin. Is there an existing method for this?
I would like to sort an NSMutableArray of UIViews according to their frame.origin.y, I
Share
NSMutableArrayhas several sorting methods. Pick one of them, implement the sorting selector, block or function and compare theyvalues. Here is an example using blocks: