目标 C:滚动视图问题
我在滚动视图中有一个滚动视图。
当滚动视图结束减速时,母滚动视图有动画并且工作正常,但是当我开始滚动内部滚动视图时,它会重复母滚动视图的动画。
我计划在子滚动视图结束减速时为其添加其他功能。
这是我的母滚动视图代码的一部分
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
CGFloat pageWidth = 768;
page = floor((self->motherScrollView.contentOffset.x - pageWidth / 2) / pageWidth) + 1;
if (page == 2)
{
//animationOnEnter
}
else if (page == 3)
{
//animationOnEnter
}
else if (page == 4)
{
//animationOnEnter
}
else if (page == 5)
{
//animationOnEnter
}
else if (page == 6)
{
//animatiOnEnter
}
else if (page == 7)
{
//animationOnEnter
}
else if (page == 8)
{
//animationOnEnter
}
//由于这个问题,我还没有为子滚动视图编写任何代码。
有人吗?提前致谢 :)
i have a scrollview inside a scrollview.
the mother scrollview has animations when the scrollview end decelerating and it working fine but when i started to scroll the inner scrollview it repeats the animations of the mother scrollview.
i am planning to put other function for the child scrollview when it ends decelerating.
here's the part of my code for the mother scrollView
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
CGFloat pageWidth = 768;
page = floor((self->motherScrollView.contentOffset.x - pageWidth / 2) / pageWidth) + 1;
if (page == 2)
{
//animationOnEnter
}
else if (page == 3)
{
//animationOnEnter
}
else if (page == 4)
{
//animationOnEnter
}
else if (page == 5)
{
//animationOnEnter
}
else if (page == 6)
{
//animatiOnEnter
}
else if (page == 7)
{
//animationOnEnter
}
else if (page == 8)
{
//animationOnEnter
}
//i haven't coded yet anything for the child scrollview because of this issue.
anyone? Thanks in advance :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)