views:

45

answers:

1

All,

This is one that should be simple, but since I'm rather new to the xcode IOS 4 developement, I gotta ask:

What I need: an Image View with a button that will then display a series of linked table views. This screams (to me) a UINavigationController where the first view is NOT a table view, but the UIImage view. I cannot get this to work.

Using the NavigationControl project, xcode insists on the first view being a table view. Not what I want. If I use a Window based view and put an image view as the root, attempts to make the secondary view a table view results in it ignoring my data source delegate methods.

Can anyone present a simple/bare bones solution that works? I've been trying this for quite some time, and am getting a bit, er, irritated at my inability to grok this.

Any and all help greatly appreciated.

bp

+1  A: 

I think this should be simple.

In your ApplicationDelegate, there should be a line like this:

MyImageViewController *myImageViewController = [[MyImageViewController alloc] init];
self.navigationController = [[[UINavigationController alloc] initWithRootView:myImageViewController] autorelease];

Then, when you want to push another UITableViewController, you can just create push and set delegate to it.

[self.navigationController pushViewController:myTableViewController];

For the delegate and datasource, is your MyTableViewController class inherits from UITableViewController and conforms to UITableViewDelegate, UITableViewDataSource?

That's all I can say without code

vodkhang
Thanks! I did manage to solve the problem -- with a combination of your help, and additional insight to errors (don't believe what one sees in interface builder).
Billy Pilgrim
now -- how do I accept the answer?
Billy Pilgrim
There is a white V mark under my answer, you can tick on that
vodkhang