First thoughts: _exclusiveTouchView is a member variable of UIWindow, it appears the device does not have a UIWindow in its view hierarchy, more specifically its responder chain. Insure that a Window is indeed being allocated and is the top level view of your view hierarchy. Are you using Interface Builder or rolling your own?
I think the problem is that somewhere you assign a view to a property that should hold a window. The code is trying to send a UIWindow message to a UIView which does not have the method. (UIWindow is a subclass of UIView.)
I don't see the immediate cause but this his app shows severe design problems. You have a UIView subclass of WPGameState which itself has a UIView property called window
. This breaks the Model-View-Controller design pattern badly.
None of the logic in either WPGameState
nor IntroStateView
belong in a view, that logic belongs in a view controller. You should have a single view controller that manages both views and handles their display, timers etc. The views should only know how to draw themselves in response to commands from the view controller.
(And why the explicative-deleted is there a singleton view? This is the kind of singleton abuse that gets singletons banned from use in some shops.)
Neither should the "game state" be in either a view or a view controller but instead should reside in its own custom data model object.
The kind of problem you are seeing is why MVC is used in the first place. By cramming so much logic into your views, you can set off an unpredictable cascade of errors just by touching the interface. If your design was more modular with clear separation of function, you would know automatically where this problem was coming from.
Ok, problem solved -- it seems there was some name clash between the main application's singleton window
variable, and the gamestate manager's use of the window
variable, as well. As TechZen mentioned, The code is trying to send a UIWindow message to a UIView which does not have the method. Here, window
was used separately by the main application as a UIWindow and window
was also being used by WPGameState as its viewport, a UIView, causing ambiguity within the frameworks.
Second use of window
has been renamed to viewport
, resolving the issue.