6

I am using a xib based view, and creating the view controllers for the tabbar programatically. I am also using ios 7 and I keep getting this message when I try to perform gestures or change tabs, of course the tabs don't change views ....

Anyone know whats going on ? I have search google and nothing comes up.

2014-09-11 16:28:38.730 Deskercise[30056:1497359] unexpected nil window in _UIApplicationHandleEventFromQueueEvent, _windowServerHitTestWindow: ; layer = >

George Host
  • 980
  • 1
  • 12
  • 26

3 Answers3

1

This error is telling you something is not registering your touch events. The next word after " _windowServerHitTestWindow: ; layer = >" in your error message is important and might be something like UIWindow. Anyway, it's whatever is not registering your touches.

The nib file for your UITabBarController class will look a little weird because it needs to have a Window object, too.

But your Outlets and Referencing Outlets are probably hooked up right or you wouldn't get this error. So my guess is your window has the wrong size settings.

I'm going to assume you want your app to work on all the devices, including iPhone and iPad.

  1. In your nib file, choose the Window object.
  2. In the Attributes selector, set the Simulated Metrics > Size to "Freeform" and the View > Mode to "Scale to Fill".
  3. Now choose the Tab Bar Controller. Set Simulated Metrics > Size to "Freeform", Orientation to "Inferred" and make sure Resize View from NIB is checked.
  4. Then in the Show the Size inspector, set the simulated size to "Freeform" again and explicitly set the width and height to 768 and 1024.
bhulan
  • 11
  • 2
1

I found a simple solution that worked for me in the Developer Forums.

Just make sure the "Full Screen at Launch" checkbox is on for the window.

0

The reason for this is the code for presenting a window no longer in the template, [UIWindow makeKeyAndVisible], I completely overlooked this.

Divya Bhaloidiya
  • 5,018
  • 2
  • 25
  • 45
George Host
  • 980
  • 1
  • 12
  • 26