4

I know it sounds a bit odd but perhaps someone has experienced the same too.

If I have a UIToolbar placed at the bottom of a Retina 4 sized xib (548 size) it does not work in the simulator (buttons show no reaction). However if I place it a bit higher (not sure where the threshold is) they work again. ???

My problematic xib looks like this:

enter image description here

georgij
  • 2,054
  • 4
  • 27
  • 43

2 Answers2

3

As mentioned elsewhere (e.g. iPhone 5 (4") bottom toolbar not responding ) the problem is that even though your view is the full height, the underlying UIWindow isn't, and the underlying UIWindow is involved in your view getting touch events.

If you have a file name something like "MainWindow.xib" in your project:

  • Open it in Interface Builder.
  • Select "Window" from the list of objects on the left side.
  • In the Attributes Inspector pane, click the "Full Screen at Launch" checkbox.

UI elements at the bottom of the screen should now work.

Community
  • 1
  • 1
John Brewer
  • 619
  • 7
  • 17
1

I found the problem being the UIWindow. (perhaps it is only a problem with older projects) As long as the window object it set to the 480 size actions falling out of its size (which can happen on Retina 4) are not recognized.

georgij
  • 2,054
  • 4
  • 27
  • 43
  • So how exactly do you fix this? – Mathieu Dec 15 '12 at 02:12
  • 1
    I'm (re)adjusting the window size to the screen size of the device the app is running on. [window setFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height)]; At start in applicationDidFinishLaunching. – georgij Dec 18 '12 at 07:07
  • I just faced the same problem. There must be a better way to fix this – pnizzle Jan 11 '13 at 01:28