我已经创建了一个使用UIScrollViewDelegate的UIScrollView子类。我创建它是为了使用OpenGL ES对象。我有以下代码:
-(void)scrollViewDidScroll:(UIScrollView *)scrollView{
for(InputEntity * iEnt in [sceneInstance inputObjects]){
iEnt.display.translation = GLKVector2Make(0, self.contentOffset.y);
}
}它最终会将所有内容放在正确的位置,但在滚动视图停止移动之前,它不会更新位置。有没有办法修复这个问题,让它看起来像UIScrollViews那样的动画?
发布于 2012-02-05 11:46:02
你有像setNeedDisplay:这样的渲染方法吗?如果你有,你可以:
-(void)scrollViewDidScroll:(UIScrollView *)scrollView{
for(InputEntity * iEnt in [sceneInstance inputObjects]){
iEnt.display.translation = GLKVector2Make(0, self.contentOffset.y);
//render here
}
}https://stackoverflow.com/questions/9146414
复制相似问题