JKMania
JKMania

Reputation: 239

How to get current postion of control in UIscrollView?

I want to get current position of control in uiscrollview, after uiscrollview scrolled by some value.

Upvotes: 1

Views: 3383

Answers (1)

guenis
guenis

Reputation: 2538

The position of your control in scrollview does not actually change with scrolling. So:

yourSubview.frame is always fixed. You can check how much of the content is scrolled in scrollview by looking at: scrollview.contentOffset the contentOffset as you might guess starts default at CGPoint : (0,0) After you scroll this value gets updated accordingly.

Upvotes: 6

Related Questions