我有scrollview
,其中有zoomscale物业内uiview
开始animation
,它以动画以及一些时间,但在这些animations
之间我想暂停animation
和恢复animation
,请帮我出这个如何在点击按钮时暂停和恢复uiview动画?
[UIView beginAnimations:@"anim1" context:NULL];
[UIView setAnimationDelegate:self];
[UIView setAnimationDuration:fanim];
z = [[arrImage1 objectAtIndex:1] floatValue];
scroll.zoomScale = z;
NSLog(@" %f",scroll.zoomScale);
if (iw != 0 || ih != 0)
{
image1.frame = CGRectMake(0, 0, iw,ih);
}
z = [[arrImage2 objectAtIndex:1] floatValue];
scroll1.zoomScale = z;
z = [[arrImage3 objectAtIndex:1] floatValue];
scroll2.zoomScale = z;
[UIView commitAnimations];
你可以参考以下几点: http://stackoverflow.com/questions/3211065/how-to-pause-and-resume-uiview-animation 和 HTTP:/ /stackoverflow.com/questions/9104487/how-to-pause-and-resume-uiview-animation-without-block-animation – 2013-04-08 05:16:23