iphone: Accessing Code for Elements Created in Interface Builder
Posted
by user362685
on Stack Overflow
See other posts from Stack Overflow
or by user362685
Published on 2010-06-09T16:52:34Z
Indexed on
2010/06/09
17:52 UTC
Read the original article
Hit count: 260
I am attempting to create a basic tab-bar application using interface builder. I create a new project in Xcode selecting tab bar application.
My question is how can I access the code that instantiates and pushes each of the views when the tab bar buttons are pressed? I would imagine that would be done by the tab bar controller, however when I write the class file from interface builder (file>write class files), it just creates a blank generic TabBarController.h/TabBarController.m without the methods for pushing each of the views associated with the tab bar elements.
I ask this because I would like to pass each view controller a reference to the data model when they are instantiated. Any help would be greatly appreciated, thanks.
© Stack Overflow or respective owner