andreamazz / andreamazz/AMScrollingNavbar

search controller on ios 11

Abierto
#296 5 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Swift
Estrellas
6k
Forks
628
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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;
}
}
```

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.