Lakshmi
Lakshmi

Reputation: 585

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 from 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

Upvotes: 0

Views: 577

Answers (1)

Chandan Shetty SP
Chandan Shetty SP

Reputation: 5117

You can get position...

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

    return pos;
}

Upvotes: 1

Related Questions