david
david

Reputation: 3583

Is there a way to make UIScrollView stop and bounce at arbitrary position

I have a long horizontal UIScrollView and I want to make it stop and bounce in some special cases. Is there a way to do that without changing the content lenght?

EDIT: I don't want it to scroll to a position, I just want it to act as if it hit its boundary somewhere.

Upvotes: 2

Views: 1232

Answers (2)

Walid Hossain
Walid Hossain

Reputation: 2714

You can use scrollRectToVisible:animated: method if you want to scroll to a particular position

Upvotes: 0

Anil
Anil

Reputation: 1028

You can enable the scroll view to bounce using:

//scroll is an instance of UIScrollView
scroll.alwaysBounceVertical/Horizontal = YES;

Upvotes: 1

Related Questions