andreamazz / andreamazz/AMScrollingNavbar
search controller on ios 11
- Dominant language
- Swift
- Stars
- 6k
- Forks
- 628
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I have an issue with navigation + search controller on ios11. If I scroll slowly my table view it can happen that search bar doesnt behave as intended-
ex1: I scroll up just a bit more than a half of nav bar height, then release - nav bar gets removed, but parts of search bar remains.
ex2: I scroll very little up, then release - nav bar gets reseted to original height, but search bar now has less height then when I started to scroll. (It doesnt help if I add self.searchController.searchBar as follower)
Any1 else with these issues?
Im using objc. For test purpose you could add property -
`@property UISearchController *searchController;`
method in viewDidLoad -
`[self initSearchController]`
and implementation -
```
- (void)initSearchController{
self.searchController = [[UISearchController alloc] initWithSearchResultsController:nil];
self.searchController.hidesNavigationBarDuringPresentation = NO;
self.searchController.searchBar.searchBarStyle = UISearchBarStyleDefault;
self.searchController.searchBar.placeholder = @"search";
if (@available(iOS 11.0, *)) {
self.navigationItem.searchController = self.searchController;
}else{
self.navigationItem.titleView = self.searchController.searchBar;
}
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.