Closed transitmark closed 10 years ago
I think it's fine. I'm always a little wary of messing with unexposed things but in this case I don't think there's likely to ever be controls in a UISearchBar we don't want enabled. How does it look? I assume this also lets you press the close button to dismiss the view even when the searchbar isn't first responder?
Looks good and yes. Button stays red and calls searchBarCancelButtonClicked when clicked even when the search bar isn't first responder.
@rosslebeau
So we don't have any conflicts with later versions of iOS we are deciding against this way and are going to try to implement our own cancel button. For what I am doing with the search bar I am going to try to add a cancel button to the uinavigationbar and set the search bar's cancel button to not show and implement my own didclickcancelbutton method.
@Smartcop Sure, we already had it implemented this way on the iPad. We can implement this while we're taking care of the other calendars stuff, or if you'd like to do it, just make a PR into 3.6/dev-intrepid when you're done.
@rosslebeau Nah that's alright you can do it :-)
@rosslebeau
What do you think about this solution?
I think I like this one over the selected because it recursively goes through all the subviews and enables them.
http://stackoverflow.com/questions/9968595/how-to-enable-cancel-button-with-uisearchbar