• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Split View
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Split View


  • Subject: Split View
  • From: Gerd Moe-Behrens <email@hidden>
  • Date: Wed, 11 Aug 2010 21:21:28 +0200

Hi,

I am trying to make a drill down (table1 > table2 > detail view) using a split view template. I would like to reuse the same table view and the same table view controller.
The problem is that the cells are empty, if I drill down to the 2nd level.


I based my code on a nice tutorial http://www.iphonesdkarticles.com/2009/03/uitableview-drill-down-table-view.html.
It worked fine for a navigation based template.
I tried to modify it for a split view template as following:

RootViewController.m
...
- (void)tableView:(UITableView *)TableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    //Get the dictionary of the selected data source.
	NSDictionary *dictionary = [self.tableDataSource objectAtIndex:indexPath.row];
    //Get the children of the present item.
	NSArray *Children = [dictionary objectForKey:@"Children"];
	if([Children count] == 0) {
          detailViewController.detailItem = [dictionary objectForKey:@"Title"];
	}
	else {
		RootViewController *rvController = [RootViewController alloc];
      //Increment the Current View
		rvController.CurrentLevel += 1;
      //Set the title;
		rvController.CurrentTitle = [dictionary objectForKey:@"Title"];
       //Push the new table view on the stack
		[self.navigationController pushViewController:rvController animated:YES];
		rvController.tableDataSource = Children;
	   [rvController release];
	}
}

How do I have to change the code? I guess the error is:
RootViewController *rvController = [RootViewController alloc];

Thanks in advance for your help.

Best

Gerd


Sent from my iPad_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: iphone large image downloading
  • Next by Date: Re: iphone large image downloading
  • Previous by thread: Re: iphone large image downloading
  • Next by thread: NSKeyedArchiver on OSX to NSKeyedUnarchiver iOS
  • Index(es):
    • Date
    • Thread