iFixit/iFixit-iOS — pull request #12 by BaseInfinity (2013-03-12 19:42:05+00:00)
Title: Fix Login Button for iOS 5 Devices

We have a tap gesture recognizer to identify when the UITableView was touched, so
we can dismiss the keyboard if a user touches outside of the text field. For some
reason iOS 5 would cancel the event of a button being pushed
(iOS 4 and 6 had no issues with this). To make this very hard to break for all
3 versions, I use reflection to check to see if the view that belongs to the
tap gesture event is of class UIButton. If we are touching a button that belongs
to the UITableView, then return false, which will prevent calling the selector
method tableViewTapped:tapGesture.