UIKit.UICollectionView.RegisterClassForSupplementaryView Method
Specifies the type to be used to populate supplementary views.

Syntax

public void RegisterClassForSupplementaryView (Type cellType, UICollectionElementKindSection section, Foundation.NSString reuseIdentifier)

See Also

UICollectionView.RegisterClassForCell
UICollectionView.RegisterNibForCell
UICollectionView.RegisterNibForSupplementaryView
UICollectionViewLayout.RegisterClassForDecorationView
UICollectionViewLayout.RegisterNibForDecorationView

Parameters

cellType
A subtype of UIKit.UICollectionReusableView to be used for supplementary views
section
The type of supplementary view being registered.
reuseIdentifier
A non-empty string to be associated with the cellType.

Remarks

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

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

It is very important that you provide constructor that takes an IntPtr argument in any subclasses that you register. This is required because the classes are actually allocated by the Objective-C runtime, and you must initialize them.

Requirements

Namespace: UIKit
Assembly: Xamarin.iOS (in Xamarin.iOS.dll)
Assembly Versions: 0.0.0.0