0

I know how to do the scroll itself, i just need help on how to detect a tap on the tabBar when on the screen to scroll up and when not on the screen to double tap to go to it and then another to scroll up.

farhan
  • 233
  • 1
  • 13

1 Answers1

0

You can use the Tab Bar delegate methods to recognise when the particular tab is clicked using Tab Bar delegate methods.

You have to keep an eye on which tab is currently selected and if the user presses the same tab again then scroll the table view to the top.

Follow this post for help in Tab Bar delegate:

Detect when a tab bar item is pressed (Swift)

tab bar click delegate (ObjC)

Community
  • 1
  • 1
Bista
  • 7,869
  • 3
  • 27
  • 55