Search code examples
model-view-controllerqtkit

How to create a controller in a Cocoa MVC application?


I want to build a Cocoa application using the Model-View-Controller design pattern. I have a view subclassing QTMovieView that handles the keyDown event. I want to create a controller with several methods like setRate, getTime, but I don't know exactly how to connect it together. Can you give me a clue?


Solution

  • I finally had element of answer to my question here. My QTMovieView (the view) has a reference to the AppDelegate (my controller). My controller contains the setRate, getTime, etc... method and transmit it to my movie object (the model).