I have a group of objects (UIImageViews) in an array. I want to arrange them by yvalues. The greater the y value, the smaller the number in the array. So the one at the top of the page will be the first in the array and the one at the bottom is the last in the array. They move around so every second or so the array will have to be re-arranged.
I have attempted to do this using NSSortDesciptors but the only way I can add a key to a UIImageView is to add .layer to the end but I can't add .layer to the array when I'm rearranging it so I get an error.
Does anyone have any idea how I could do this? Any help would be greatly appreciated.
Cheers,
Ozzie
I have attempted to do this using NSSortDesciptors but the only way I can add a key to a UIImageView is to add .layer to the end but I can't add .layer to the array when I'm rearranging it so I get an error.
Does anyone have any idea how I could do this? Any help would be greatly appreciated.
Cheers,
Ozzie