Sefran2
Sefran2

Reputation: 3588

Is there a way to know how many pixels a user moves a scrollview?

Is there a specific way to know how many pixels a user moves a scrollview? I would dynamically resize a textview accordingly.

Thanks

Fran

Upvotes: 1

Views: 272

Answers (1)

cesarislaw
cesarislaw

Reputation: 1599

Look at the UIScrollViewDelegate Protocol Reference. Specifically check the Responding to Scrolling and Dragging methods, from there you can check the contentOffset property of the scrollview which will give you the x and y offset from the origin.

EDIT: Added the proper name of the contentOffset property.

Upvotes: 1

Related Questions