English 中文(简体)
C#“标签”财产对于可转让的电文箱来说是何种等值?
原标题:What is the equivalent of C# "tag" property in objective-c cocoa-touch for a UITableViewCell?

我很想知道,我是否能够把一个数据物体存放在与表ViewCell相关的某个标签上,以方便从逻辑上获得与该单元相关的数据。

因此,是否有财产储存数据标本? a 表格

增 编

最佳回答

单电电汇(和许多其他可可班)的标签只储存了一种ger。 你们可以利用它储存一些预先界定的固定,例如。

myCell.tag = TAG_CELL_HEADER;

或您可采用一个编号办法,以挽救与牢房对应的模型识别。

myCell.tag = TAG_RECORD_OFFSET + record.rowid;

In general, you can keep an array of data and use the tag as an index into it.

问题回答

与C#不同的是,tag在家庭财产控制中采用分类数据。 目前,在可可没有相当于C# tag的财产。

http://www.ohchr.org。

每个电算电算器都有一个电池“识别器”(NSString)。 如能以每间囚室的形式标示,或采用另一种类型的识别方法,则对你有利。

可在议会中确定:

-(UITableViewCell *)tableView:UITableView * 观点小组 ForRowAtIndexPath:NSIndexPath *

static NSString *CellIdentifier = @"MyIdentifierString";




相关问题
How do you create UIBarButtonItems with a radio interface?

I have a UIToolbar that needs three buttons in a radio style, meaning that of the three, only one button can be pushed at a time. The documentation makes reference to the possibility of setting up ...

iPhone settings bundle

I want to allow the user to enter a valid date using the iPhone’s settings application. I have experimented with many of the PreferenceSpecifiers data node types including date. I have two issues: ...

Circular #import/@class problem in ObjectiveC

I m going to use an example to properly illustrate my confusion. I can t quite wrap my head around this. In Cocoa touch, we have UIViewController and its subclass, UINavigationController. Now, UIVC ...

Writing a masked image to disk as a PNG file

Basically I m downloading images off of a webserver and then caching them to the disk, but before I do so I want to mask them. I m using the masking code everyone seems to point at which can be found ...

Cocoa-Touch: issue looping MPMoviePlayerController

I have an app which has to load some data at startup, so I want to display a splash-screen animation. I m using the MPMoviePlayerController to play a m4v file. The movie has it s background set to [...

Iphone sequential animation with setAnimationDelay

I m trying to chain animation events. The application I m coding for work has a multiple choice quiz. First you pick your multiple choice answer. The quiz view fades away. Then a label ("correct" or "...