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;
}
精彩评论