UITableView.RegisterClassForHeaderFooterViewReuse Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| RegisterClassForHeaderFooterViewReuse(Type, NSString) |
Registers a type to provide UITableViewHeaderFooterView instances for headers or footers for a specific reuse identifier. |
| RegisterClassForHeaderFooterViewReuse(Type, String) |
Registers the |
RegisterClassForHeaderFooterViewReuse(Type, NSString)
Registers a type to provide UITableViewHeaderFooterView instances for headers or footers for a specific reuse identifier.
public void RegisterClassForHeaderFooterViewReuse(Type cellType, Foundation.NSString reuseIdentifier);
public void RegisterClassForHeaderFooterViewReuse(Type? cellType, Foundation.NSString reuseIdentifier);
member this.RegisterClassForHeaderFooterViewReuse : Type * Foundation.NSString -> unit
Parameters
- cellType
- Type
The type of a UITableViewHeaderFooterView to create when the specified reuseIdentifier is passed to DequeueReusableHeaderFooterView(String), or null to unregister the reuse identifier.
- reuseIdentifier
- NSString
The reuse identifier.
Remarks
Registering types with reuse identifiers helps reduce the amount of code that you have to write in your GetViewForFooter(UITableView, IntPtr) or GetViewForHeader(UITableView, IntPtr) methods. It means that your code only needs to call DequeueReusableHeaderFooterView(String) with the reuse identifier, and if there is no available header or footer view, the UITableView will create an instance of the specified type and return it.
The type that you register must provide a constructor that takes a NativeHandle parameter and needs to chain to the UITableViewHeaderFooterView(NativeHandle) constructor.
Applies to
RegisterClassForHeaderFooterViewReuse(Type, String)
Registers the cellType type for header or footer view reuse, keyed by the identifier reuseIdentifier.
public void RegisterClassForHeaderFooterViewReuse(Type cellType, string reuseIdentifier);
public void RegisterClassForHeaderFooterViewReuse(Type? cellType, string reuseIdentifier);
member this.RegisterClassForHeaderFooterViewReuse : Type * string -> unit
Parameters
- cellType
- Type
The type of a UITableViewHeaderFooterView to create, or null to unregister the reuse identifier.
- reuseIdentifier
- String
The reuse identifier string.