【发布时间】:2012-03-09 10:16:27
【问题描述】:
对不起,标题我不知道该写什么。
我有一个包含许多页面的滚动视图,并且在每个页面中都有不同的动画,当用户切换到该页面时应该启动。
我试过这个:
if (CGPointEqualToPoint (CGPointZero, CGPointZero))
{
//start animation
}
它只适用于第一页
当我在下一页将其更改为 CGPointEqualToPoint (CGPointMake (768, 0), CGPointZero) 时,它不起作用。
我正在尝试使用这个`
- (void)scrollViewWillEndDragging:(UIScrollView *)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset
但后来我发现当滚动视图pagingEnabled 是YES 时它不起作用。
【问题讨论】:
-
您将不得不更多地解释上下文。你是在 scrollViewDidScroll 中这样做的吗?
标签: objective-c ios uiscrollview cgpoint