开发者

How to know, how much I scrolled in a UIScrollview?

开发者 https://www.devze.com 2022-12-22 10:40 出处:网络
Hey guys I have an image of 3200x480 and I have also 4 tabs. All the Views in the 4 tabs have the same image.

Hey guys I have an image of 3200x480 and I have also 4 tabs. All the Views in the 4 tabs have the same image.

What I want to do is that when I scroll lets say the first view to any point all the others views in the other tabs also scroll their images to the same position? Any tips?

I tried with contentOffset and contentInset开发者_开发知识库, but I wasn't able to do that.

How can I know at what point my scrollview is showing in the ipod so I can get that gcpoint and send it to the other views... Thanks

Carlos Vargas


UIScrollViewDelegate's - (void)scrollViewDidScroll:(UIScrollView *)scrollView combined with [scrollView contentOffset] and [scrollView setContentOffset:] should handle what you've described.

Please edit and sample code for what you've tried already.

0

精彩评论

暂无评论...
验证码 换一张
取 消