-(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
助けてください