Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screen flicking when select a address from search result list #6

Closed
moon-jerry opened this issue May 28, 2020 · 2 comments
Closed

Screen flicking when select a address from search result list #6

moon-jerry opened this issue May 28, 2020 · 2 comments

Comments

@moon-jerry
Copy link

The issue was textFieldDidEndEditing getting called multiple times, cause the function 'viewMovedown' gets called multiple times -> animation multiple times.

Solution,

fire endEditing event only once, what I did was comment out code below in private func didSelectPlacemark()

//self.searchbar.textFieldDidEndEditing(self.searchbar.textInput)
// Dismiss search results view
//self.showSearchResultsView(false) //

then add self.searchbar.endEditing(true) in

// Configure searchResultsView
searchResultsView = SearchResultsView(didSelectAction: { [weak self] (placemark) in
guard let self = self else { return }
self.didSelectPlacemark(placemark)
self.searchbar.endEditing(true)
})

let me know if you want me push the changes.

@twho
Copy link
Owner

twho commented May 28, 2020

Sure, please make a PR, thanks!

@twho
Copy link
Owner

twho commented May 31, 2020

Thanks for your contribution, I've applied your fix and rewrite animation logics.

@twho twho closed this as completed May 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants