Highriser
Highriser

Reputation: 212

UIScrollView in UITableView Header not scrolling

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.

Upvotes: 0

Views: 1635

Answers (1)

vntstudy
vntstudy

Reputation: 2048

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

  scrollView.contentSize=CGSizeMake(100,960);

Upvotes: 6

Related Questions