다음을 통해 공유


UICollectionView.RegisterClassForSupplementaryView 메서드

정의

오버로드

RegisterClassForSupplementaryView(Type, UICollectionElementKindSection, NSString)

보조 뷰를 채우는 데 사용할 형식을 지정합니다.

RegisterClassForSupplementaryView(Type, NSString, String)

보조 뷰를 채우는 데 사용할 형식을 지정합니다.

RegisterClassForSupplementaryView(Type, UICollectionElementKindSection, String)

보조 뷰를 채우는 데 사용할 형식을 지정합니다.

RegisterClassForSupplementaryView(IntPtr, NSString, NSString)

보조 뷰를 채우는 데 사용할 형식을 지정합니다.

RegisterClassForSupplementaryView(Type, NSString, NSString)

보조 뷰를 채우는 데 사용할 형식을 지정합니다.

RegisterClassForSupplementaryView(Type, UICollectionElementKindSection, NSString)

보조 뷰를 채우는 데 사용할 형식을 지정합니다.

public void RegisterClassForSupplementaryView (Type cellType, UIKit.UICollectionElementKindSection section, Foundation.NSString reuseIdentifier);
member this.RegisterClassForSupplementaryView : Type * UIKit.UICollectionElementKindSection * Foundation.NSString -> unit

매개 변수

cellType
Type

보조 보기에 사용할 의 UICollectionReusableView 하위 형식

section
UICollectionElementKindSection

등록할 보조 보기의 유형입니다.

reuseIdentifier
NSString

에 연결할 비어 있지 않은 문자열입니다 cellType.

설명

UICollectionView 오프스크린 구성 요소에 대해 매우 효율적인 재사용 큐를 유지 관리합니다. 이를 위해서는 가 UICollectionView 해당 구성 요소 뷰의 수명 주기 관리를 담당해야 합니다. 이 메서드(및 와 같은 RegisterClassForCell(Type, String)관련 메서드)는 인스턴스화해야 하는 형식에 대한 지식을 제공합니다 UICollectionView .

애플리케이션 개발자는 를 로 reuseIdentifier전달할 null 수 있습니다. 이 경우 는 cellType "등록되지 않음"이 되고 더 이상 인스턴스화되지 않습니다. 애플리케이션 개발자는 이전에 다른 형식과 연결된 를 reuseIdentifier 전달할 수 있습니다. 이 경우 이전 형식은 "등록 해제"되고 새 cellType 형식이 사용됩니다.

등록하는 모든 하위 클래스에서 IntPtr 인수를 사용하는 생성자를 제공하는 것이 매우 중요합니다. 이는 클래스가 실제로 Objective-C 런타임에 의해 할당되고 초기화해야 하기 때문에 필요합니다.

추가 정보

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

적용 대상

RegisterClassForSupplementaryView(Type, NSString, String)

보조 뷰를 채우는 데 사용할 형식을 지정합니다.

public void RegisterClassForSupplementaryView (Type cellType, Foundation.NSString kind, string reuseIdentifier);
member this.RegisterClassForSupplementaryView : Type * Foundation.NSString * string -> unit

매개 변수

cellType
Type
kind
NSString
reuseIdentifier
String

적용 대상

RegisterClassForSupplementaryView(Type, UICollectionElementKindSection, String)

보조 뷰를 채우는 데 사용할 형식을 지정합니다.

public void RegisterClassForSupplementaryView (Type cellType, UIKit.UICollectionElementKindSection section, string reuseIdentifier);
member this.RegisterClassForSupplementaryView : Type * UIKit.UICollectionElementKindSection * string -> unit

매개 변수

cellType
Type
reuseIdentifier
String

적용 대상

RegisterClassForSupplementaryView(IntPtr, NSString, NSString)

보조 뷰를 채우는 데 사용할 형식을 지정합니다.

[Foundation.Export("registerClass:forSupplementaryViewOfKind:withReuseIdentifier:")]
protected virtual void RegisterClassForSupplementaryView (IntPtr viewClass, Foundation.NSString kind, Foundation.NSString reuseIdentifier);
abstract member RegisterClassForSupplementaryView : nativeint * Foundation.NSString * Foundation.NSString -> unit
override this.RegisterClassForSupplementaryView : nativeint * Foundation.NSString * Foundation.NSString -> unit

매개 변수

viewClass
IntPtr

nativeint

IntPtr 보조 보기에 사용할 형식에 대한 입니다.

kind
NSString

등록할 보조 보기 유형(예: "UICollectionElementKindSectionHeader")입니다.

reuseIdentifier
NSString

에 연결할 비어 있지 않은 문자열입니다 kind.

특성

설명

UICollectionView 오프스크린 구성 요소에 대해 매우 효율적인 재사용 큐를 유지 관리합니다. 이를 위해서는 가 UICollectionView 해당 구성 요소 뷰의 수명 주기 관리를 담당해야 합니다. 이 메서드(및 와 같은 RegisterClassForCell(Type, String)관련 메서드)는 인스턴스화해야 하는 형식에 대한 지식을 제공합니다 UICollectionView .

애플리케이션 개발자는 를 로 reuseIdentifier전달할 null 수 있습니다. 이 경우 는 viewClass "등록되지 않음"이 되고 더 이상 인스턴스화되지 않습니다. 애플리케이션 개발자는 이전에 다른 형식과 연결된 를 reuseIdentifier 전달할 수 있습니다. 이 경우 이전 형식은 "등록 해제"되고 새 viewClass 형식이 사용됩니다.

등록하는 모든 하위 클래스에서 IntPtr 인수를 사용하는 생성자를 제공하는 것이 매우 중요합니다. 이는 클래스가 실제로 Objective-C 런타임에 의해 할당되고 초기화해야 하기 때문에 필요합니다.

추가 정보

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

적용 대상

RegisterClassForSupplementaryView(Type, NSString, NSString)

보조 뷰를 채우는 데 사용할 형식을 지정합니다.

public void RegisterClassForSupplementaryView (Type cellType, Foundation.NSString kind, Foundation.NSString reuseIdentifier);
member this.RegisterClassForSupplementaryView : Type * Foundation.NSString * Foundation.NSString -> unit

매개 변수

cellType
Type

보조 보기에 사용할 의 UICollectionReusableView 하위 형식입니다.

kind
NSString

등록할 보조 보기 유형(예: "UICollectionElementKindSectionHeader")입니다.

reuseIdentifier
NSString

에 연결할 비어 있지 않은 문자열입니다 kind.

적용 대상