Merge pull request #29 from deathbaba/searchFix
[iOS] Scroll to top fix
This commit is contained in:
commit
37c57e905d
1 changed files with 2 additions and 2 deletions
|
@ -179,9 +179,9 @@
|
|||
m_storage.QueryArticleInfo([searchText UTF8String], self.locationManager.location.coordinate.latitude, self.locationManager.location.coordinate.longitude);
|
||||
else
|
||||
m_storage.QueryArticleInfo([searchText UTF8String]);
|
||||
if ([searchText length])
|
||||
[self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:YES];
|
||||
[self.tableView reloadData];
|
||||
if (m_storage.GetResultsCount() && [self.tableView numberOfRowsInSection:0])
|
||||
[self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:YES];
|
||||
}
|
||||
|
||||
#pragma mark - Utils methods
|
||||
|
|
Reference in a new issue