Reputation: 375
I'm trying to build my first cocoa application. done some iPhone developing before. I have a hard time understanding how to layout my project.
i making a Pong game and my current design is to allocate an NSWindowController from my appDelegate. I then use custom view to act as paddles and ball. My problem is that i can't get the window controller to capture key events. Am i thinking wrong here? My idea is to have a controller class with all the logic, should i subclass another class for that?
Upvotes: 1
Views: 434
Reputation: 21569
Input events will be delivered to the views in the responder chain, so you should add all of your event-handling code to the custom view you mentioned, rather than the window controller.
Upvotes: 2