ShelbyTV / Shelby-Genius-iOS

Genius-Only iOS App
0 stars 0 forks source link

Touching anywhere on the screen should make search keyboard disappear #5

Closed markerrj closed 12 years ago

markerrj commented 12 years ago

When search entry field is highlight, keyboard is shown.

Touching anywhere on the screen besides the search box should probably make the keyboard disappear. Otherwise there's no way of dismissing the keyboard once it's brought up.

Right now, I expect the keyboard to disappear, and instead I inadvertently end up touching a Previous Shelby Search.

ArtSabintsev commented 12 years ago

Oops! Forgot to add the UIResponder method that rakes care of that. Thanks!

ArtSabintsev commented 12 years ago

Added the UIResponder method touchesEnded:WithEvent. It registers everywhere, except on the UINavigationBar, and UITableViewCells (only if they're populated). I will add an invisible button over the UINavigationBar that resign's the UISearchBar's firstResponder.

markerrj commented 12 years ago

@ArtSabintsev do you mean populated UITableViewCells will still be touchable with the keyboard up?

UX-wise, ideally I think even touching populated UITableViewCells would first hide the keyboard. Then UITableView cells would only be touchable if keyboard is hidden...

ArtSabintsev commented 12 years ago

That makes sense. What I'll do is put a transparent, touchable view in the region above the keyboard, but below the searchBar once. When that region is touch, the view is removed, and the keyboard is hidden.

markerrj commented 12 years ago

@ArtSabintsev sounds good.

ArtSabintsev commented 12 years ago

All fixed and up on GitHub.