UIScrollViewDelegate 不滚动动画
我创建了一个使用 UIScrollViewDelegate 的 UIScrollView 子类。我创建它是为了与 OpenGL ES 对象一起使用。我有以下代码:
-(void)scrollViewDidScroll:(UIScrollView *)scrollView{
for(InputEntity * iEnt in [sceneInstance inputObjects]){
iEnt.display.translation = GLKVector2Make(0, self.contentOffset.y);
}
}
它最终将所有内容放在正确的位置,但直到滚动视图停止移动后才会更新位置。有没有办法解决这个问题,使其看起来像 UIScrollViews 一样动画?
I have created a subclass of UIScrollView that uses the UIScrollViewDelegate. I created it to work with OpenGL ES objects. I have the following code:
-(void)scrollViewDidScroll:(UIScrollView *)scrollView{
for(InputEntity * iEnt in [sceneInstance inputObjects]){
iEnt.display.translation = GLKVector2Make(0, self.contentOffset.y);
}
}
It eventually puts all the content in the correct spot, but it does not update the locations until after the scroll view has stopped moving. Is there a way to fix this so it looks animated like UIScrollViews do?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你有像
setNeedDisplay:
这样的渲染方法吗?如果你有,你可以:
do you have render method like
setNeedDisplay:
if you have,you can: