I have an app with long data list in the tableView, and I would like to double tap the navigationBar to scroll the UITableView on top of the list (where the search is).
How can I implement that?
Thanks for your help.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The standard gesture for scrolling a tableView to the top is a single tap on the status bar. It’s enabled by default see UIScrollView Reference
If you really want the navigation bar and you’re targeting 3.2 and up I would recommend to attach an UITapGestureRecognizer to the navigationBar.
If you’re targeting 3.0 or below it could become a little tricky and is not recommend.