0
votes

Following problem: I have a UITableView with several cells. The table has also a header, in which i added a UIScrollView, which should scroll horizontal.

So now when i scroll around the screen the table will always be scrolled, but not the UIScrollView in the header, even if i scroll horizontal in the area of the header.

So it seems the table is managing all the scrolling. How can i setup the UITableView scrolling so that the UIScrollView in the header handles the horizontal scrolling for the header area.

I tried to set delegate of the UIScrollView and tried the function from the UIScrollViewDelegate, - (void)scrollViewDidScroll:(UIScrollView *)scrollView, but only the table calls this function.

I hope you can help me.

1
Is the contentSize of the header scrollview set correctly?Hetal Vora
It was set, but not correctly. It had the same size as the frame so it didn't scroll. Thanks for that!Highriser

1 Answers

6
votes

Set content Size properly. Content size should be the width and height till where you want to scroll.

  scrollView.contentSize=CGSizeMake(100,960);