开发者

Need to get position of an UIImage animating from top to bottom of screen

I am using animation for an UIImageView. So,that an image is animating fr开发者_开发问答om top to bottom of iPhone screen. I gave start and end positions for that imageView for animation. While it is moving, I want to know the current position of that image on the View.

Can any ne help in this regard. Thank You


You can get position...

-(SLfloat) getYPos
{
    SLfloat pos = 0;
    CALayer *layer = yourAnimationView.layer.presentationLayer;
    if(layer)
        pos = layer.frame.origin.y;

    return pos;
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜