Helge Becker
Helge Becker

Reputation: 3243

Odd UIBarButtonItem behaviour

Try the following in the simulator or a device.

Create a new Master-Detail application for iPhone or compare any app that uses navigation bars. iOS 5 or 6, don't matter. In the case of the template: Let it run,create an entry using the plus button and open the entry.

Now touch the area below the navbar directly under the UIBarButtonItem thats leads back.

Even when the button nor the navigation bar is clearly not touched, the button will activate and the view does return.

Example

This is way beyond the 44x height of the navbar. What is happening here? Why does this button respond way beyond his frame? Cant find an info about this in the HIG.

Upvotes: 2

Views: 212

Answers (1)

Mundi
Mundi

Reputation: 80265

iPhone

The area you can press to activate the back button is actually larger than the actual pixels of the button to accommodate the average thickness of fingers. (The actual number of pixels is buried somewhere in Apples HIG. I think it is 44x44.) This is expected behavior.

iPad

The master view controller is automatically dismissed when you tap outside it. This is expected behavior.

Upvotes: 1

Related Questions