1

I have a scrollView with two embedded tableViews. Each of these are placed such that they are shown when I scroll to left and right respectively. Also I have two buttons like tabs, to switch to the respective tableViews.

I want the the tableviews to scrollToTop on tapping the status bar. I referred this stackoverflow answer and tried the following solution:

On clicking Button A or when scrolled to tableViewA:

tableViewA.scrollsToTop = YES;
tableViewB.scrollsToTop = NO;
scrollView.scrollsToTop = NO;

Implemented similarly for tableViewB too.

scrollToTop works fine. The issue is that, sometimes, when I scrollToTop from tableviewA, tableViewB comes up, and vice versa.

Please provide your valuable suggestions or a solution to this problem. Thanks!

Community
  • 1
  • 1
GoGreen
  • 2,251
  • 1
  • 17
  • 29

0 Answers0