mskw
mskw

Reputation: 10358

How to make uiscrollview's paging page slower?

Is it even possible to change the speed at which we page? I know Apple does it with their iOS6 App Store. But maybe they are using undocumented APIs.

Anyone?

Upvotes: 1

Views: 490

Answers (1)

Jan Christiansen
Jan Christiansen

Reputation: 3173

I don't think there is an official way to change the paging speed, I don't know whether there are any private properties.

If you want to implement it yourself, you would have to implement the paging by responding to the UIScrollViewDelegate methods. However, you would also have to implement custom scrolling behaviour for a UIScrollView, as you cannot specify the duration of the animation of setContentOffset:animated:.

I have done something similar when I have tried to mimic the behaviour of the safari tab selection view. Perhaps some part of it helps you, solving your problem. First, I have implemented a UIScrollView subclass whose setContentOffset:animated: takes a duration and a timing function. The tab view implements paging by using the delegate methods of UIScrollView and calling setContentOffset:animated: with a custom duration.

Upvotes: 2

Related Questions