Uibutton Fails to Properly Register Touch in Bottom Region of iPhone Screen

UIButton fails to properly register touch in bottom region of iPhone screen

This sounds like an interaction between the buttons and the UIScreenEdgePanGestureRecognizer (or whatever it is) that is responsible for detecting that the user wants to bring up the system's Control Center.

There are actually two potential issues here:

  • There can be an interaction (i.e. conflict) between the possibility of a gesture directed at your app and a gesture directed at the system. If you have gesture recognizers, you might have to use delegate methods to mediate between them and the system's gesture recognizers.

  • There is a well-established bug where a tap near the screen edge (i.e. in the screen edge gesture recognizer's "zone") works but it causes the button to misbehave physically, i.e. it doesn't look as if it's been tapped even though logging shows that it has (see my answer here: https://stackoverflow.com/a/22000692/341994).

UIButton on left side of screen (in iOS 7 navigation slide area) not highlighted

I can confirm this bug with almost no code at all. All you need is an image file to serve as the background image. In the storyboard set this up:

Navigation Controller -> (root view controller) ViewController -> Button -> push segue... ->
ViewController2 -> Button

Put the second button up against the left side of its containing view (ViewController2's view) and set the image file as its highlighted background image.

Now run the app and tap the first button, to summon the second view controller's view. Tap the button at its right side: the highlighted background image appears. Now tap the button at its left side: the highlight background image does not appear, but the button is in fact receiving the tap (you can confirm that by giving it an action method that logs).

So, I would say you've got yourself a legitimate bug and you should report it to Apple. I'm certainly going to!

Last button in my scroll view cannot register touch

Please check your views using view debugger and ensure that your button is inside the scrollview. Sometimes if you adjust the content size of scroll view the button could be gone out of the scroll view.



Related Topics



Leave a reply



Submit