UICollectionView.RegisterNibForCell 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
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
- 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>