开发者

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

开发者 https://www.devze.com 2023-02-24 23:25 出处:网络
I am using animation for an UIImageView. So,that an image is animating fr开发者_开发问答om top to bottom ofiPhone screen. I gave start and end positions for that imageView for animation. While it ismo

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

精彩评论

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