Note that there are some explanatory texts on larger screens.

plurals
  1. POThree20: Make a TTTableItem link to a TTViewController
    primarykey
    data
    text
    <p>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.</p> <p>In my TTListDataSource, I'm currently doing: </p> <pre><code>- (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&lt;SearchResultsModel&gt;)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]; } } </code></pre> <p>But I need to pass an object (not just a string) to the <code>TTViewController</code> when the <a href="http://github.com/facebook/three20/blob/master/src/Three20/TTTableItem.h" rel="nofollow noreferrer">TTTableItem</a> is clicked. I know that you can pass an <code>NSDictionary</code> object to a <a href="http://github.com/facebook/three20/blob/master/src/Three20/TTViewController.h" rel="nofollow noreferrer">TTViewController</a> using: <a href="http://github.com/facebook/three20/blob/master/src/Three20/TTNavigator.h" rel="nofollow noreferrer">TTNavigator</a>'s <code>[[TTNavigator navigator] openURL: query: animated:]</code> method.</p> <p>However, since I'm trying to open this URL from a <code>TTTableItem</code>, I don't know how to use openURL method with it where I can pass a query <code>NSDictionary</code> object, since all it takes as an <code>NSString</code> "URL" parameter. </p> <p>I read the discussion <a href="http://groups.google.com/group/three20/browse_thread/thread/1f70e6b36ce8999b" rel="nofollow noreferrer">here</a> 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. </p> <p><strong>What's the simplest way I can make my table item's open up a <code>TTViewController</code> and pass an object (such as an <code>NSDictionary</code>)</strong>? </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload