Tutorial :Right way to make controller react on space key event


Im making an application where i got a cue list, and some other views around it. When the user presses Space, i want the next cue to play. No matter what view is first responder, unless its a textfield. So even though another table is selected, i want the cue to get played.

I have made a custom class that acts as cue controller, this is where the actual "go" code is.

My question is, how should i make my custom cue controller always listening to the space? Can't really find out what I should do.

Hope somebody can help me.


You want to watch WWDC 2010 session 145. (Even if you didn't go to WWDC, you should have accessâ€"Apple granted access to everybody this year.) It'll tell you everything you need to know about the many ways to handle a keypress.

Every Mac developer should watch that session.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »