Buttons not responding on iPod Touch yet works fine on iPhone
At the bottom bar of around 60 pixels in height and covering the whole width of the screen I have two UIButtons. I and many other people have tested the app on several iPhones ranging from OS3.0 to 4.0 -- works fine, buttons respond to touch. Recently I purchased an iPod Touch from ebay specifically for Testing. The device came with OS3.0. Everything on the app works fine except that buttons at the bottom are not responding to touch events.
I Launched 'Stocks' app and few others to see whether buttons at the bottom of those apps are working fine on the device. And they indeed are working. So not a hardware issue with this device. Just like stocks app I have exactly the same info button, on the same location (though slightly bigger). Yet my button does not responds. At a loss to understand what is going on. And interestingly if I move the button up by 13 pixels or more it starts working.
Increasing the hit target of the button made it work. Initially my images were 30 x 30 pixels and they worked fine on iphone 3GS and iPad. Most likely the issue is with lower screen resolution of ipod touch 1st gen though this is just a guess. With lower screen resolution a 30x30 pixel button wasn't big enough for touch. Increasing the frame (without increasing the image size) to 84x 84 made it work.
链接地址: http://www.djcxy.com/p/50410.html