Welcome to the Three20 forums! Before you dive too deep into things, please read our forum rules.
Add URL feature to my custom table
  • Vote Up1Vote Down ArtworkADArtworkAD September 2011
    Posts: 17

    Hi,

    I followed this tutorial: http://three20.pypt.lt/custom-cells-in-tttableviewcontroller#hellotableitemcellm and have successfully implemented my custom table with custom cells.

    I want to make the cells clickable. On table cell click another view should be opened. When using the default three20 text item I can specify an url and the cell is clickable by default. How can I do this in my custom cell according to the specified tutorial? Any ideas?

  • 3 Comments sorted by
  • There are a couple of options:

    1. Use TTNavigator for your project. If you go this route, since your custom table cell's item extends from TTTableLinkedItem, Three20 will automatically set the disclosure indicator and selection style for you when you set the URL property of the item (that gets converted to the cell). The gotcha here is that you have to make sure that you've added a mapping in TTNavigator's URL map (check out the setObject method in TTTableLinkedItemCell).

    2. Roll your own solution. Very simple; just set the disclosure indicator and selection style for the cell like so:

      • (void)setObject:(id)object { //...initialization code... self.accessoryType = UITableViewCellAccessoryDisclosureIndicator; self.selectionStyle = TTSTYLEVAR(tableSelectionStyle); }
    Then, you'll have to override the didSelectObject:atIndexPath method in your subclassed TTTableViewController in order to actually do something when the cell gets clicked.
  • amazing information for life insurance quotes at http://www.termlifeinsuranceco.com - term life insurance

  • Vote Up0Vote Down autoinsuranceautoinsurance October 2011
    Posts: 0

    unique information on cheap carinsurance

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Login with Facebook Sign In with Twitter

Sign In Apply for Membership

In this Discussion

Latest Three20 version: 1.0.5

Who's Online (2)