UICollectionViewLayoutAttributes.CreateForDecorationView 方法

定义

重载

CreateForDecorationView(NSString, NSIndexPath)

创建表示装饰视图的布局属性对象。

CreateForDecorationView<T>(NSString, NSIndexPath)

创建表示修饰视图的特定类型的布局属性对象。

CreateForDecorationView(NSString, NSIndexPath)

创建表示装饰视图的布局属性对象。

[Foundation.Export("layoutAttributesForDecorationViewOfKind:withIndexPath:")]
public static UIKit.UICollectionViewLayoutAttributes CreateForDecorationView(Foundation.NSString kind, Foundation.NSIndexPath indexPath);
static member CreateForDecorationView : Foundation.NSString * Foundation.NSIndexPath -> UIKit.UICollectionViewLayoutAttributes

参数

kind
NSString

修饰视图的种类标识符。

indexPath
NSIndexPath

与修饰视图相关的索引路径。

返回

表示修饰视图的布局属性对象。

属性

注解

使用此方法创建一个布局属性对象,该对象表示特定类型的装饰视图。 如果已子类化 UICollectionViewLayoutAttributes,并且需要返回子类的实例,请改用 CreateForDecorationView(NSString, NSIndexPath) 。 此方法等效于调用 CreateForDecorationView<UICollectionViewLayoutAttributes>。

适用于

CreateForDecorationView<T>(NSString, NSIndexPath)

创建表示修饰视图的特定类型的布局属性对象。

public static T CreateForDecorationView<T>(Foundation.NSString kind, Foundation.NSIndexPath indexPath) where T : UIKit.UICollectionViewLayoutAttributes;

类型参数

T

要返回的布局属性对象的类型。

参数

kind
NSString

修饰视图的种类标识符。

indexPath
NSIndexPath

与修饰视图相关的索引路径。

返回

T

表示修饰视图的特定类型的布局属性对象。

注解

使用此方法可创建表示特定类型的布局属性对象,该对象表示特定类型的修饰视图。

适用于