Advice on making multiple windows in Xcode...

Discussion in 'Mac Programming' started by MatthewF, Jun 27, 2010.

  1. MatthewF macrumors newbie

    Joined:
    Jun 27, 2010
    #1
    Hey in all my previous applications I've only needed one window and I put practically all my code in a single NSView. This NSView controlled everything, received all input, and did the drawing. All in one nice and neat .h and .m file.

    Now I'm making multiple windows and am a bit worried. How should I set it up? Should I put all my logic code in the delegate and have individual drawing code in each window? How will the drawing code access the logic to know what to draw?
    Can I somehow connect both windows and all things it contains to the delegate so the delegate can use logic and manipulate the NSViews to draw stuff?


    Thanks,
    Matt
     
  2. mrbash macrumors 6502

    Joined:
    Aug 10, 2008
    #2
    This is a really good question. I believe that MVC is the answer you are looking for.
     

Share This Page