Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Odd error with ios tabbar touch and touch gestures

Tags:

ios

xib

ios8

tabbar

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 = >

like image 669
George Host Avatar asked Sep 11 '14 20:09

George Host


2 Answers

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.
like image 177
bhulan Avatar answered Oct 11 '22 16:10

bhulan


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.

like image 40
Bertil Holmberg Avatar answered Oct 11 '22 16:10

Bertil Holmberg