I have a strange issue and I am not sure what is causing it. I have a horizontal scroll view which has an unknown width (paging is enabled):
myScrollView.contentSize = CGSizeMake(320 * count, myScrollView.frame.size.height);
Inside this scroll view is a single table (myTable) which updates depending what the current page is. In the scrollViewDidScroll method - the int page is set, pageControl (UIPageControl) is updated and then I shift the table so that it is still in view. After moving the table I update the data and reload the table.
- (void)scrollViewDidScroll:(UIScrollView *)sender {
CGFloat pageWidth = myScrollView.frame.size.width;
page = floor((tableScroll.contentOffset.x - pageWidth / 2) / pageWidth) + 1;
pageControl.currentPage = page;
[myTable setFrame:CGRectMake(tableScroll.contentOffset.x, 0, 320, 213)];
//[myTable bringSubviewToFront:tableScroll];
//[tableScroll bringSubviewToFront:self.view];
[self getMyData];
[myTable reloadData];
This works fine and the table is visible after scrolling and the data has been updated. The issue I am having is that all interactivity of the table is lost. I cannot click any buttons on the cell or click the cell itself. Interaction is only working on the very first page.
Does anyone know what may be causing this or how to solve it. Cheers