This is related to my previous post, but I am trying to understand what another developer has told me concerning building a custom navigation menu mechanism for the iPhone. I am new to objective C/iPhone stuff, but experienced in programming in general. What I am trying to create is a custom menu system that does NOT involve UINavigationController. Only UITableViews. THe way that it was told to me was that I can create a class that "has knowledge of the parent". THe code looking like so...
@import "Blah.h"
@implementation Blah
@synthesize parent = _parent;
@synthesize title = _title;
-(id)initWithFrame:(CGRect)frame parent:(PopupModelView*)parent
{
if ((self = [super initWithFrame:frame]))
{
if(parent != nil)
_parent = [parent retain];
}
return self;
}
I can also add some custom methods here too.
So I create a bunch of files that create UITableViews. I click on an item on the UITableView, and in it's didSelectRowAtIndexPath handler I need to invoke "Blah" and pass a new UITableView to an as yet method in the above - the new method used to create and display the new UITableView. The new UITableView should have knowledge of the datasource in order to display the new menuItems as well as the "delegate" which contains other info important to menu.
I was wondering if this discussion makes sense, or can provide some clarity to this issue. If I did this in ActionScript it would probably take me about 10 minutes, but this is a little confusing for me :S
thanks