I needed to see touch events on my window, so I subclassed UIWindow to make my a MYWindow class. I am overriding the sentEvent function to receive the touch events on the window and all of that is working just fine. I did the following to achieve this:
self.window = [[MYWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
[window makeKeyAndVisible];
The issue I am facing is that when I do this, the viewControllers that are on this window won't rotate anymore. If I were to use a regular UIWindow, they all work just like I intended them to work. Obviously, something is wrong with my setup.
I was looking through UIWindow header file and there is a method called
- (void)becomeKeyWindow; //override point for subclass, Do Not call directly
Am I suppose to implement this in my custom UIWindow class just like I had to implement the sendEvent: method? Please point me in the right direction with this.
Thanks in advance guys.