iphone - Storing unique ID in UITableViewCell -


I have a table where there will often be two cells with the same title. Whenever a cell is clicked on a table, I am zooming on a map, so the use of 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 the UTable Wexcel object.

I am considering two options, both of which are bad, IMO.

1) Store the unique ID as text in the form of extended text labels in the form of text

2) Create the custom UITableViewCell class.

I am new to Objective-C, and I would like to know essentially what is the third option which is not as inefficient as # 1, but it has not been included as # 2 .

Post-text "itemprop =" text ">

use the cell's tag property (works only when your identifier It is an integer.)

He said that cells already have a unique identifier (although not necessarily stable) and this is their indexPath , i.e. their position in the table. Generally, you should not use cells to store any data directly. Instead, d Store the data in a model object and maintain the connection between the model data and view it through the index.

This is particularly important when tables behave with views such as cell visits to cell As soon as it is reused or distributed it is scrolled from the screen.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -