i have 2 nsmutablearray
s uiimageview
s in it. wondering how check if frames of uiimageview
s 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
Post a Comment