I have a scrollView
with two embedded tableView
s. 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 tableView
s.
I want the the tableview
s 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!