#13 Loading views from a CIB using CPViewController and Atlas

In this episode, I’ll show you – in a single window application like iTunes or iPhoto – how you can load views from CIBs using a CPViewController (and Atlas).

7 Comments

  1. Social comments and analytics for this post…

    This post was mentioned on Twitter by tbalthazar: I just published a new #Cappuccino Cast : http://j.mp/CappCast13...

  2. [...] This post was mentioned on Twitter by Thomas Balthazar, Leif Singer, ǝɯoloʇɹɐq lǝɐɥdɐɹ, Ⓙohannes Ⓕahrenkrug, railsgeek and others. railsgeek said: New CappuccinoCast: #13 Loading views from a CIB using CPViewController and Atlas http://is.gd/71KvH [...]

  3. Calvin4 says:

    SO COOL!!! Thanks Thomas!

  4. Jerod Santo says:

    Great cast Thomas!

    Another way you could have handled the problem with having too many subviews would be to use [mainView setSubviews:[[mainViewController view]]];

    In this case, you wouldn’t have to manually remove each view before adding a new one.

  5. Bill Chapman says:

    This screencasts are so well done and I am learning a ton from them – especially the last few.

    One question about this last tutorial:?

    If one defines the View.cib as instances of class CPViewController, then ‘view’ appears up as a property that can be connected in Atlas to a empty CPView, as was done in the tutorial.

    However, if I make a custom class and call it CustomViewController and have it inherit from CPViewController, then I don’t see the same ‘view’ property appear and cannot make a connection in Atlas. Why is this?

  6. Thomas says:

    @Bill Chapman : Hi Bill, thanks for you message.
    What you have to do is :
    1/ create a file and name it for instance ‘CustomViewController.j’
    2/ don’t forget to import it in your AppController.j @import “CustomViewController.j”
    3/ you should now see the “view” connection in Atlas.

    Hope this helps,
    Thomas.

  7. TARUN says:

    Hi Thomas,

    I was wondering if each subview can have their own controller ? I tried your suggestion, also created “Test” button in subview and added one funtion in CustomViewController.j and liked to that but its not working.