I’m an experienced developer, but relatively new to iOS.
I’m having some trouble with an iPad App, where my views are not responding to button touches in the bottom third of the screen. Touches on other buttons are working fine, so I know my views are getting hooked up properly when they’re loaded (I’ve created them in IB.) I get the same behavior on both the simulator and the device.
This is a landscape-orientation-only App, and I’m loading views using [NSBundle LoadNibNamed:]. This was the only non-trivial portion of the App, and I think I’ve jumped through all the appropriate hoops:
The landscape orientation may not be related, but I thought I should mention it, since it was the only thing I found a little wonky to build, and I see from the boards that other people have found this problematic as well..
Does anyone have any ideas?
Thanks.
More than likely, your autoresizing masks are not set correctly. This means that the view's bounds are not changing to match the window. Touches are only detected within the bounds of a view's super view, so if you have a button that sits outside its superview's bounds, it won't get any touches.
For a quick test, try setting your view's background color and see if the view does properly extend to the bottom of the screen.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With