开发者

Find out which segment the image resides in objective c

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 c开发者_运维技巧orner.

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

Thanks :)


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);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜