#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).
- Download .mov file (71.5 MB, 7:56)
- Download .m4v file for iPod/iPhone (9.8 MB, 7:56)
- This episode on Vimeo (HD quality)
- Full episode source code


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...
[...] 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 [...]
SO COOL!!! Thanks Thomas!
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.
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?
@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.
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.