停止UIScrollView的减速 [英] Stop deceleration of UIScrollView

查看:196
本文介绍了停止UIScrollView的减速的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在iPhone 3.0中立即停止减速UIScrollView的最佳方法是什么?

What's the best way to immediately stop the deceleration of an UIScrollView in iPhone 3.0?

我想保持UIScrollView的减速直到它自然停止或者用户执行某项操作,无论先发生什么。

I would like to keep the deceleration of the UIScrollView until it naturally stops or the user performs a certain action, whatever happens first.

谢谢!

推荐答案

未经测试的建议即将出现:)

Untested suggestion coming up:)

当捕获按钮点击事件时,您会读取[scrollView contentOffset] .x的内容,并将偏移量设置为此值动画关闭。

When the button tap event is caught, you read what the [scrollView contentOffset].x is, and set the offset to this value with animation OFF.

这篇关于停止UIScrollView的减速的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆