可能重复:
如何在动画时获取 UIView 帧的原点和大小
-(void)anothertarget1
{
UIImage *uranus=[UIImage imageNamed:@"red-ball1.png"];
imagev=[[UIImageView alloc]initWithFrame:CGRectMake(5, 10, 100, 100)];
imagev.alpha=0.6;
imagev.image=uranus;
[self.view addSubview:imagev];
CGPoint goal = CGPointMake(self.view.center.x+70,self.view.center.y+24);
CGPoint center=imagev.center;
NSLog(@"center=%f",center);
UIViewAnimationOptions opt = UIViewAnimationOptionAllowUserInteraction;
[UIView animateWithDuration:20 delay:0 options:opt animations:^{
//forimageview1;
imagev.center = goal;
} completion:^(BOOL f) {
imagev.hidden=YES;
}];
}
我想制作一个UIImageview
在动画期间获取当前位置的对象,请帮助我