kevin-lyn / STPopup

STPopup provides STPopupController, which works just like UINavigationController in popup style, for both iPhone and iPad. It's written in Objective-C and compatible with Swift.
MIT License
2.6k stars 345 forks source link

UISearchBar not repositioning in popup when keyboard is dismissed on searchBarSearchButtonClicked: #54

Closed apiejh closed 8 years ago

apiejh commented 8 years ago

Hi, I have a problem and was hoping, you guys could help.

I'm using the popup to present a UIViewController containing a UITableView. On viewDidLoad I am instantiating a UISearchController and assigning the searchBar view to the tableView's tableHeaderView property.

This all works great until I tap on the search button. In this case, the searchBar remains in situ while the rest shifts down as usual (see video link below). Is there a way to fix this?

https://goo.gl/f1x6V1

Thanks!

kevin-lyn commented 8 years ago

@apiejh This is an issue. STPopup is not supporting UISearchController, and I don't think it has to. Since it's a popup, having the same behavior as a normal UIViewController to present UISearchController is unnecessary. So I would suggest you use UISearchBar without UISearchController instead, should work the same as you want.

apiejh commented 8 years ago

Hi @kevin0571, thanks for the swift reply. I will try to get around this as per your suggestion.

ajonescodes commented 7 years ago

Encountering same issue. What was the solve (example code)?