dequeueReusableCellWithIdentifier
来源:互联网 发布:知乎 恐怖提问 编辑:程序博客网 时间:2024/04/27 00:44
dequeueReusableCellWithIdentifier:
Returns a reusable table-view cell object located by its identifier.
- (UITableViewCell *)dequeueReusableCellWithIdentifier:(NSString *)identifier
Parameters
- identifier
A string identifying the cell object to be reused. By default, a reusable cell’s identifier is its class name, but you can change it to any arbitrary value.
Return Value
A UITableViewCell
object with the associated identifier or nil
if no such object exists in the reusable-cell queue.
Discussion
For performance reasons, a table view’s data source should generally reuseUITableViewCell
objects when it assigns cells to rows in itstableView:cellForRowAtIndexPath:
method. A table view maintains a queue or list ofUITableViewCell
objects that the table view’s delegate has marked for reuse. It marks a cell for reuse by assigning it a reuse identifier when it creates it (that is, in theinitWithFrame:reuseIdentifier:
method of UITableViewCell
). The data source can access specific “template” cell objects in this queue by invoking thedequeueReusableCellWithIdentifier:
method. You can access a cell’s reuse identifier through its reuseIdentifier
property, which is defined by UITableViewCell
.
Availability
- Available in iPhone OS 2.0 and later.
Related Sample Code
- DrillDownSave
- SimpleDrillDown
- TableSearch
- TableViewSuite
- UICatalog
Declared In
UITableView.h
- dequeueReusableCellWithIdentifier
- dequeueReusableCellWithIdentifier
- dequeueReusableCellWithIdentifier
- dequeueReusableCellWithIdentifier
- dequeueReusableCellWithIdentifier vs dequeueReusableCellWithIdentifier : forIndexPath
- dequeueReusableCellWithIdentifier:CellIdentifier
- UITableView dequeueReusableCellWithIdentifier
- 区别dequeueReusableCellWithIdentifier 和dequeueReusableCellWithIdentifier: forIndexPath
- dequeueReusableCellWithIdentifier和dequeueReusableCellWithIdentifier:forIndexPath的区别
- dequeueReusableCellWithIdentifier: 与dequeueReusableCellWithIdentifier: forIndexPath:的区别
- dequeueReusableCellWithIdentifier:和dequeueReusableCellWithIdentifier: forIndexPath:的问题
- [tableView dequeueReusableCellWithIdentifier:@"identify"]
- dequeueReusableCellWithIdentifier的运行机制
- dequeueReusableCellWithIdentifier的理解
- dequeueReusableCellWithIdentifier方法问题
- dequeueReusableCellWithIdentifier的运行机制
- dequeueReusableCellWithIdentifier的理解
- dequeueReusableCellWithIdentifier: forIndexPath: 获取cell
- ASP.NET2.0 “名称以无效字符开头”
- 字符编码详解及由来(UNICODE,UTF-8,GBK)
- 张立波的游戏人生
- JSP 中 pageEncoding charset 的区别
- 关于“对象”
- dequeueReusableCellWithIdentifier
- 高效SQL
- 无线网络的各种安全性类型
- String.replaceALL用法。
- ACE的官方下载地址
- AS3 sound类的一些技巧
- 好与坏的页面展示(从推荐系统角度)
- 如何在前台给asp.net中label赋值
- Windows中如何获取键盘和鼠标处于空闲状态的时间