views:

36

answers:

1

The Human Interface Guidelines says "Create controls that are at least 29 pixels high and provide a target area that’s 44 pixels high".

So I was wondering when I use an UIButtonTypeCustom with stretchable Background Image and Text, is there a way to set the target area?

Just changing the buttons frame to 44 pixel stretches the background image.

In case there is no way set the target area, is the recommended way to just use a 44px high background image?

+1  A: 

If you put a second UIButton of type UIButtonTypeCustom on top of the image you can have the touch area be any size that you want.

DHamrick
I assume you mean to put a larger transparent button overlaying a smaller image button...
hotpaw2
But this wouldn't change the underlaying button to its selected state.
catlan
@catlan You will have to manually change the underlying buttons selected state when the larger one is pressed.
DHamrick
I still think it's simpler to just fill the background image transparent to get 44px height - less code
catlan