UITableView.RegisterNibForCellReuse 方法

定义

重载

RegisterNibForCellReuse(UINib, NSString)

指定要用于具有指定标识符的单元格的 nib 文件。

RegisterNibForCellReuse(UINib, String)

使用给定的 identifer 字符串注册包含 UITableViewCell) 的 nib 对象 (。

RegisterNibForCellReuse(UINib, NSString)

指定要用于具有指定标识符的单元格的 nib 文件。

[Foundation.Export("registerNib:forCellReuseIdentifier:")]
public virtual void RegisterNibForCellReuse (UIKit.UINib nib, Foundation.NSString reuseIdentifier);
abstract member RegisterNibForCellReuse : UIKit.UINib * Foundation.NSString -> unit
override this.RegisterNibForCellReuse : UIKit.UINib * Foundation.NSString -> unit

参数

nib
UINib

内容待定。

此参数可以为 null

reuseIdentifier
NSString
属性

适用于

RegisterNibForCellReuse(UINib, String)

使用给定的 identifer 字符串注册包含 UITableViewCell) 的 nib 对象 (。

public void RegisterNibForCellReuse (UIKit.UINib nib, string reuseIdentifier);
member this.RegisterNibForCellReuse : UIKit.UINib * string -> unit

参数

nib
UINib

从 nib 文件创建的 nib 对象。 此值不能为 null

reuseIdentifier
String

用作单元格标识符的字符串。 此值不能为 null

注解

向表视图注册 nib 对象后,如果重用队列中还没有实例,则使用正确的 idtifer 调用 DequeueReusableCell(NSString) 将导致表视图从 nib 对象实例化单元格。

适用于