Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Status bar tap should scroll table view to the top [duplicate]

Tags:

ios

iphone

Can anybody please tell me how to implement tap on status bar and table view should scroll to top. I also have another scroll view in that view controller for some different purpose.

Thanks in advance

like image 376
Sundeep Saluja Avatar asked Apr 01 '13 10:04

Sundeep Saluja


1 Answers

If you are having more than one scrollview inside the viewcontroller, you set setScrollsToTop property to YES for the scrollview you want to scroll when user taps status bar. And also set that property to NO for all other scrollviews. If there is only one scrollview/tableview, You don't even need to do this. It will be set automatically.

[myScrollView setScrollsToTop:YES];

[otherScrollview setScrollsToTop:NO];

like image 189
Gopinathan Avatar answered Nov 15 '22 20:11

Gopinathan