forked from organicmaps/organicmaps
[ios] SearchVC search activity moved to search bar
This commit is contained in:
parent
508f4e9bae
commit
ccce27476b
1 changed files with 4 additions and 10 deletions
|
@ -515,11 +515,6 @@ static void OnSearchResultCallback(search::Results const & res)
|
|||
else
|
||||
[self.activityIndicator stopAnimating];
|
||||
|
||||
[UIView animateWithDuration:0.15 animations:^{
|
||||
self.activityIndicator.alpha = searching ? 1 : 0;
|
||||
m_table.alpha = searching ? 0 : 1;
|
||||
}];
|
||||
|
||||
_searching = searching;
|
||||
}
|
||||
|
||||
|
@ -528,11 +523,10 @@ static void OnSearchResultCallback(search::Results const & res)
|
|||
if (!_activityIndicator)
|
||||
{
|
||||
_activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
|
||||
CGFloat activityX = self.view.width / 2;
|
||||
CGFloat activityY = self.scopeView.maxY + ((self.view.height - KEYBOARD_HEIGHT) - self.scopeView.maxY) / 2;
|
||||
_activityIndicator.center = CGPointMake(activityX, activityY);
|
||||
_activityIndicator.alpha = 0;
|
||||
[self.view addSubview:_activityIndicator];
|
||||
_activityIndicator.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin;
|
||||
_activityIndicator.center = CGPointMake(self.searchBar.width - 45, self.searchBar.height / 2);
|
||||
_activityIndicator.backgroundColor = [UIColor whiteColor];
|
||||
[self.searchBar addSubview:_activityIndicator];
|
||||
}
|
||||
return _activityIndicator;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue