Storing unique ID in UITableViewCell

Posted by culov on Stack Overflow See other posts from Stack Overflow or by culov
Published on 2010-06-14T09:42:19Z Indexed on 2010/06/14 9:52 UTC
Read the original article Hit count: 259

I have a table where there will often be two cells with the same title. I'm zooming in on a map whenever a cell in the table is clicked, so using the title as a unique identifier is out of the question. I already have a unique identifier, but I need to find a way to store it in a UITableViewCell object.

I have been considering two options, both of which are poor, IMO.

1) store the unique ID as the text inside the text of the detailTextLabel property.

2) build a custom UITableViewCell class.

I'm new to objective C, and I would essentially like to know if theres a third option that isnt as inefficient as #1, but not as involved as #2.

Thanks

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c