UICollectionView.RegisterNibForCell Method

Definition

Overloads

RegisterNibForCell(UINib, NSString)

Specifies the type to be used to populate cells.

RegisterNibForCell(UINib, String)

Registers the Nib file that will be used for cell UI.

RegisterNibForCell(UINib, NSString)

Specifies the type to be used to populate cells.

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

Parameters

nib
UINib

The UINib to be used to populate cells.

reuseIdentifier
NSString

A non-empty string to be associated with the nib.

Attributes

Remarks

The UICollectionView maintains a highly-efficient reuse queue for offscreen components. This requires that the UICollectionView be responsible for the lifecycle management of its component views. This method (and related methods such as RegisterClassForSupplementaryView(Type, UICollectionElementKindSection, String)) provide the UICollectionView the knowledge of which types it needs to instantiate.

The application developer may pass null as the reuseIdentifier, in which case the nib will be "un-registered" and no longer instantiated. The application developer may pass in a reuseIdentifier previously associated with another nib, in which case the old nib will be "de-registered" and the new nib will be used.

See also

  • <xref:UIKit.UICollectionView.RegisterClassForSupplementaryView>
  • <xref:UIKit.UICollectionView.RegisterClassForCell>
  • <xref:UIKit.UICollectionView.RegisterNibForSupplementaryView>
  • <xref:UIKit.UICollectionViewLayout.RegisterClassForDecorationView>
  • <xref:UIKit.UICollectionViewLayout.RegisterNibForDecorationView>

Applies to

RegisterNibForCell(UINib, String)

Registers the Nib file that will be used for cell UI.

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

Parameters

nib
UINib
reuseIdentifier
String

Applies to