UICollectionView.SetCollectionViewLayout 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
SetCollectionViewLayout(UICollectionViewLayout, Boolean) | |
SetCollectionViewLayout(UICollectionViewLayout, Boolean, UICompletionHandler) |
设置此 UICollectionView使用的布局。 |
SetCollectionViewLayout(UICollectionViewLayout, Boolean)
[Foundation.Export("setCollectionViewLayout:animated:")]
public virtual void SetCollectionViewLayout (UIKit.UICollectionViewLayout layout, bool animated);
abstract member SetCollectionViewLayout : UIKit.UICollectionViewLayout * bool -> unit
override this.SetCollectionViewLayout : UIKit.UICollectionViewLayout * bool -> unit
参数
- layout
- UICollectionViewLayout
- animated
- Boolean
true
如果要对过渡到新布局进行动画处理,则为 。
- 属性
注解
在 UICollectionView 显示之前,必须分配其 CollectionViewLayout 。 应用程序开发人员必须使用 UICollectionViewC:UIKit.UICollectionView.UICollectionView (System.Drawing.RectangleF、UIKit.UICollectionViewLayout) 构造函数实例化 ,或者在显示 UICollectionView之前调用此方法。
适用于
SetCollectionViewLayout(UICollectionViewLayout, Boolean, UICompletionHandler)
设置此 UICollectionView使用的布局。
[Foundation.Export("setCollectionViewLayout:animated:completion:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 7, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual void SetCollectionViewLayout (UIKit.UICollectionViewLayout layout, bool animated, UIKit.UICompletionHandler completion);
abstract member SetCollectionViewLayout : UIKit.UICollectionViewLayout * bool * UIKit.UICompletionHandler -> unit
override this.SetCollectionViewLayout : UIKit.UICollectionViewLayout * bool * UIKit.UICompletionHandler -> unit
参数
- layout
- UICollectionViewLayout
- animated
- Boolean
true
如果要对过渡到新布局进行动画处理,则为 。
- completion
- UICompletionHandler
完成所有其他操作后执行的完成处理程序操作。
- 属性