[英]When i switch View In TabBarController the ScrollView Stop Scroll,How to Solve it?
in Controller A: here the Code: 在控制器A中:代码如下:
[UIView animateWithDuration:5 animations:^{
[self.awardScrollView setContentOffset:CGPointMake(self.awardScrollView.frame.size.width * 19, 0)];
} completion:^(BOOL finished) {
isFinished = YES;
}];
i set 5s to finish the animation,but i switch controller to B with TabBarController ,i found the animation is stop in Controller A.How can i let the ScrollView continue Scroll Background in Controller A even i Switch to Controller B ? 我将5s设置为完成动画,但是我使用TabBarController将控制器切换到了B ,我发现动画在Controller A中停止了。即使我切换到Controller B ,我如何也可以让ScrollView在Controller A中继续滚动背景?
Core Animation won't animate a view that's not in the on-screen view hierarchy. Core Animation不会为不在屏幕视图层次结构中的视图设置动画。 When a view is removed from the on-screen view hierarchy, Core Animation removes all animations from the view.
从屏幕上的视图层次结构中删除视图时,Core Animation将从视图中删除所有动画。
You can add another animation when the view comes back on screen if you want. 如果需要,可以在视图重新显示在屏幕上时添加其他动画。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.