views:

14

answers:

1

Hi,

I have created a rotating wheel of 5 images. What I would like to find out is which image ends up in the top right corner.

Is there any way I can realize which one is in the top right corner through coding?

Thanks :)

A: 

If your images are going to end up in specific spots, meaning you know exactly what will be the position of an image when it is in the 'top right corner', you can check the origin (of directly the frame) of that image view.

BOOL bingo = CGRectEqualToRect(imageViewRect, topRightCornerRect);

or

BOOL bingo = CGPointEqualToPoint(imageViewOrigin, topRightCornerRectOrigin);
lukya