When do you need to use a view controller?

Posted by BeachRunnerJoe on Stack Overflow See other posts from Stack Overflow or by BeachRunnerJoe
Published on 2010-06-13T19:55:42Z Indexed on 2010/06/13 20:02 UTC
Read the original article Hit count: 120

Filed under:
|
|

I'm diving into iPhone development and one of the core concepts im trying to get my head around is view controllers. If you look at the GLPaint example on the apple dev site, you'll see a project that has...

  1. An app delegate class
  2. A uiwindow subclass
  3. And a uiview subclass

And the uiview subclass implements all the core graphics painting logic and handles the touch events. My questions are, why is there no view controller implemented to handle that view logic? Could you use a view controller to implement that logic or does it have to be implemented in the uiview subclass? And last, when should you use a view controller to implement the view logic code?

Thanks so much in advance for your help!

© Stack Overflow or respective owner

Related posts about iphone

Related posts about uiview