Hi,
I am quite new to iPhone programming and have problem with an application. I have an App based on some flipSideViews. One view includes a tableView. Using IB I did place a table view into one of my flipsideviews. Flipping to this side shows an empty table and so far is all good. The problem is that I have made a class called placemarker, defining an object placemaker. My goal is to place the objects (I assume as string) into the tableView. So to do this I have so collect all placemaker objects into an array and then show this array in the table. I have a rootViewController controlling all may flipsideviews and in this rootviewcontroller class did I write the following method:
- (void)loadDataFlipSideViewController {
DataFlipSideViewController *viewController = [[DataFlipSideViewController alloc] initWithNibName
"Cars" bundle:nil];
self.dataFlipSideViewController = viewController;
[viewController release];
// Set up the navigation bar
UINavigationBar *aNavigationBar = [[UINavigationBar alloc] initWithFrame:CGRectMake(0.0, 0.0, 320.0, 44.0)];
aNavigationBar.barStyle = UIBarStyleBlackOpaque;
self.dataFlipSideNavigationBar = aNavigationBar;
[aNavigationBar release];
UIBarButtonItem *buttonItem = [[UIBarButtonItem alloc] initWithTitle
"Back" style:UIBarButtonSystemItemDone target:self action
selector(datatoggleView)]; //initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action
selector(toggleView)];
UINavigationItem *navigationItem = [[UINavigationItem alloc] initWithTitle
"Cars"];
navigationItem.leftBarButtonItem = buttonItem;
[dataFlipSideNavigationBar pushNavigationItem:navigationItem animated:NO];
[navigationItem release];
[buttonItem release];
}[/SIZE
Iam using the nib-file Cars which is the one I created in interface builder, including a tableView. My problem is to connect the tableView to the data stored in the array. How do I do that? I assuem that my problem is the dataSource and the delegate...? My intention was to create an IBoutlet beeing a tableView and fill this table with the data from the array. After that I thought I could connect this IBOutlet with the actual tableView in the xib file? I would be very happy if someone could give me a hint here, how to organize this. I am use to Java and does not really get the syntax I suppose...
thanks in advance
/MACloop
I am quite new to iPhone programming and have problem with an application. I have an App based on some flipSideViews. One view includes a tableView. Using IB I did place a table view into one of my flipsideviews. Flipping to this side shows an empty table and so far is all good. The problem is that I have made a class called placemarker, defining an object placemaker. My goal is to place the objects (I assume as string) into the tableView. So to do this I have so collect all placemaker objects into an array and then show this array in the table. I have a rootViewController controlling all may flipsideviews and in this rootviewcontroller class did I write the following method:
- (void)loadDataFlipSideViewController {
DataFlipSideViewController *viewController = [[DataFlipSideViewController alloc] initWithNibName
self.dataFlipSideViewController = viewController;
[viewController release];
// Set up the navigation bar
UINavigationBar *aNavigationBar = [[UINavigationBar alloc] initWithFrame:CGRectMake(0.0, 0.0, 320.0, 44.0)];
aNavigationBar.barStyle = UIBarStyleBlackOpaque;
self.dataFlipSideNavigationBar = aNavigationBar;
[aNavigationBar release];
UIBarButtonItem *buttonItem = [[UIBarButtonItem alloc] initWithTitle
UINavigationItem *navigationItem = [[UINavigationItem alloc] initWithTitle
navigationItem.leftBarButtonItem = buttonItem;
[dataFlipSideNavigationBar pushNavigationItem:navigationItem animated:NO];
[navigationItem release];
[buttonItem release];
}[/SIZE
Iam using the nib-file Cars which is the one I created in interface builder, including a tableView. My problem is to connect the tableView to the data stored in the array. How do I do that? I assuem that my problem is the dataSource and the delegate...? My intention was to create an IBoutlet beeing a tableView and fill this table with the data from the array. After that I thought I could connect this IBOutlet with the actual tableView in the xib file? I would be very happy if someone could give me a hint here, how to organize this. I am use to Java and does not really get the syntax I suppose...
thanks in advance
/MACloop