I have a UIScrollView (with paging) to which I add three UIViews. Each of these UIViews has a UITableView inside. Thus, the user should be able to scroll horizontally to the page that he wants, and then scroll vertically in the corresponding table.
However, some of the tables do not receive scroll gestures. Usually the first behaves well, while the others do not. I cannot select cells or scroll the table up or down.
I used the default settings for UIScrollView, with the exception of those defined in viewDidLoad:
- (void)viewDidLoad { [super viewDidLoad]; //Load the view controllers [self loadViewControllers]; //Configure the scroll view self.scrollView.pagingEnabled = YES; self.scrollView.contentSize = CGSizeMake(CGRectGetWidth(self.scrollView.frame) * viewControllers.count, CGRectGetHeight(self.scrollView.frame)); self.scrollView.showsHorizontalScrollIndicator = NO; self.scrollView.showsVerticalScrollIndicator = NO; self.scrollView.scrollsToTop = NO; self.scrollView.delegate = self; //Configure the page control self.pageControl.numberOfPages = viewControllers.count; self.pageControl.currentPage = 0; }
I canβt understand why I canβt scroll through some tables ... Any help would be greatly appreciated.
Thanks in advance!
ios iphone uitableview scroll uiscrollview
Sagito
source share