UICollectionView.RegisterNibForSupplementaryView 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
RegisterNibForSupplementaryView(UINib, NSString, NSString) |
指定要用于填充补充视图的类型。 |
RegisterNibForSupplementaryView(UINib, UICollectionElementKindSection, NSString) |
指定要用于填充补充视图的笔尖。 |
RegisterNibForSupplementaryView(UINib, UICollectionElementKindSection, String) |
注册将在补充视图中用于 UI 的 Nib 文件。 |
RegisterNibForSupplementaryView(UINib, NSString, NSString)
指定要用于填充补充视图的类型。
[Foundation.Export("registerNib:forSupplementaryViewOfKind:withReuseIdentifier:")]
public virtual void RegisterNibForSupplementaryView (UIKit.UINib nib, Foundation.NSString kind, Foundation.NSString reuseIdentifier);
abstract member RegisterNibForSupplementaryView : UIKit.UINib * Foundation.NSString * Foundation.NSString -> unit
override this.RegisterNibForSupplementaryView : UIKit.UINib * Foundation.NSString * Foundation.NSString -> unit
参数
- kind
- NSString
(“UICollectionElementKindSectionHeader”) 注册的补充视图的类型。
- reuseIdentifier
- NSString
要与 nib
关联的非空字符串。
- 属性
注解
为 UICollectionView 屏幕外组件维护高效重用队列。 这要求 UICollectionView 负责其组件视图的生命周期管理。 此方法 (和相关方法(如 RegisterNibForCell(UINib, String)) )提供 UICollectionView 实例化所需的类型的知识。
应用程序开发人员可以传递 null
为 reuseIdentifier
,在这种情况下, nib
将“未注册”且不再实例化。 应用程序开发人员可能会传入以前与另一个 reuseIdentifier
笔尖关联的 ,在这种情况下,旧笔尖将“取消注册”,并使用新 nib
笔尖。
另请参阅
- <xref:UIKit.UICollectionView.RegisterClassForSupplementaryView>
- <xref:UIKit.UICollectionView.RegisterNibForCell>
- <xref:UIKit.UICollectionView.RegisterClassForCell>
- <xref:UIKit.UICollectionViewLayout.RegisterClassForDecorationView>
- <xref:UIKit.UICollectionViewLayout.RegisterNibForDecorationView>
适用于
RegisterNibForSupplementaryView(UINib, UICollectionElementKindSection, NSString)
指定要用于填充补充视图的笔尖。
public void RegisterNibForSupplementaryView (UIKit.UINib nib, UIKit.UICollectionElementKindSection section, Foundation.NSString reuseIdentifier);
member this.RegisterNibForSupplementaryView : UIKit.UINib * UIKit.UICollectionElementKindSection * Foundation.NSString -> unit
参数
- section
- UICollectionElementKindSection
正在注册的补充视图的类型。
- reuseIdentifier
- NSString
要与 nib
关联的非空字符串。
注解
为 UICollectionView 屏幕外组件维护高效重用队列。 这要求 UICollectionView 负责其组件视图的生命周期管理。 此方法 (和相关方法(如 RegisterNibForCell(UINib, String)) )提供 UICollectionView 实例化所需的类型的知识。
应用程序开发人员可以传递 null
为 reuseIdentifier
,在这种情况下, nib
将“未注册”且不再实例化。 应用程序开发人员可能会传入以前与另一个 reuseIdentifier
笔尖关联的 ,在这种情况下,旧笔尖将“取消注册”,并使用新 nib
笔尖。
适用于
RegisterNibForSupplementaryView(UINib, UICollectionElementKindSection, String)
注册将在补充视图中用于 UI 的 Nib 文件。
public void RegisterNibForSupplementaryView (UIKit.UINib nib, UIKit.UICollectionElementKindSection section, string reuseIdentifier);
member this.RegisterNibForSupplementaryView : UIKit.UINib * UIKit.UICollectionElementKindSection * string -> unit
参数
- nib
- UINib
- section
- UICollectionElementKindSection
- reuseIdentifier
- String