objective c - UIImageView array frame equality -


i have 2 nsmutablearrays uiimageviews in it. wondering how check if frames of uiimageviews equal frames of other array in objective-c. there function this?

assuming arrays same length , called array1 , array2.

__block bool equal = yes; [array1 enumerateobjectsusingblock:^(uiimageview *imageview, nsuinteger idx, bool *stop) {     uiimageview *otherimageview = array2[idx];     if (!cgrectequaltorect(imageview.frame, otherimageview.frame))     {         equal = no;         *stop = yes;     } }];  if (equal) {     // stuff } 

Comments