views:

344

answers:

1

I working on a utility app. When I run the app in simulator clicking i image at the bottom flips the view in a flash. But when I run the app on iPhone device it behaves abnormally. At times it flips the view in just 1 tap. The other times it does not bother to react even after tapping the image 10 times. I tried with other utility app also - same issue. Thus its not an issue with the code I believe.

Any help to resolve this issue is much appreciated.

Thanks, AJ

+2  A: 

This is a problem because the 'i' button is not very big by default and touches are missed easily.

You need to put another button in front of the 'i' button with the 'Custom' type in Interface Builder, so that it doesn't have any image. Then you can make this invisible button much larger and connect it to the same action as the info button.

You also need to enable "shows touch on highlight" in Interface Builder so that you get the white glow effect when the invisible button is touched.

Mike Weller
Michael- Thanks for the suggestion.After asking my question, I created a custom i image similar to that of the original but having a black square in the background. Thus the image becomes somewhat bigger and touches are not missed and it works great on iPhone device. However this approach returns a warning in NIB file in IB when compiles for OS prior to 3.0. The warning is "specifying the content stretch rectangle is not supported on iphone os versions prior to 3.0"Any idea how can I get rid of this one.Thanks,AJ
AJ
I don't know what that error means really. I would honestly just go the route I mentioned in my answer. Create a standard i button normal size etc. and put an invisible "Custom" type button in front of it with a larger size and the 'shows touches' property set to true.
Mike Weller