views:

136

answers:

1

Or: How to expand the sensitive area for a UIControl without just making the view bigger?

I have a pretty small button image (a little arrow), which is just 10 x 10 pixels. Too small for touching. I want the "hot area" to be 50 x 50 around that. For learning, I want to know how to do it manually, even if I could use some of the provided UIControls for this purpose.

+1  A: 

You could always layer another view over top -- perhaps a UIButton set to custom type so it's invisible -- and have that button trigger what you want to happen when it gets touched.

But your real issue is using 10x10 pixel areas for user control in the first place. The smallest user control I can think of (say, in the Calendar app) has about a 30x30 area for the [+] button.

Think of your users and ask yourself what their experience will be dealing with tiny little controls.

Shaggy Frog