I want my table items to show the disclosure arrow and link to another "details" screen. Pretty standard. Three20 is supposed to help with this.
In my TTListDataSource, I'm currently doing:
- (void)tableViewDidLoadModel:(UITableView *)tableView
{
[super tableViewDidLoadModel:tableView];
// Construct an object that is suitable for the table view system
// from each domain object that we retrieve from the TTModel.
for (Listing *result in [(id<SearchResultsModel>)self.model results]) {
NSString *url = [NSString stringWithFormat:@"myapp://listing", result.theID];
TTTableSubtitleItem *item = [TTTableSubtitleItem itemWithText:result.title subtitle:result.desc imageURL:result.imageURL defaultImage:nil URL:url accessoryURL:nil];
[self.items addObject: item];
}
}
But I need to pass an object (not just a string) to the TTViewController
when the TTTableItem is clicked. I know that you can pass an NSDictionary
object to a
TTViewController using: TTNavigator's [[TTNavigator navigator] openURL: query: animated:]
method.
However, since I'm trying to open this URL from a TTTableItem
, I don't know how to use openURL method with it where I can pass a query NSDictionary
object, since all it takes as an NSString
"URL" parameter.
I read the discussion here however I'd really, really like to avoid having to modify the original Three20 code. If it can properly be extended, that would be fine.
What's the simplest way I can make my table item's open up a TTViewController
and pass an object (such as an NSDictionary
)?