共用方式為


UICollectionView.SetCollectionViewLayout 方法

定義

多載

SetCollectionViewLayout(UICollectionViewLayout, Boolean)

UICollectionViewLayout變更 所使用的 UICollectionView

SetCollectionViewLayout(UICollectionViewLayout, Boolean, UICompletionHandler)

設定這個 UICollectionView 所使用的版面配置。

SetCollectionViewLayout(UICollectionViewLayout, Boolean)

UICollectionViewLayout變更 所使用的 UICollectionView

[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

參數

animated
Boolean

true 如果轉換至新版面配置應該以動畫顯示,則為 。

屬性

備註

UICollectionView必須先指派它, CollectionViewLayout 才能顯示。 應用程式開發人員必須使用 UICollectionView 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

參數

animated
Boolean

true 如果轉換至新版面配置應該以動畫顯示,則為 。

completion
UICompletionHandler

完成所有其他作業之後要執行的完成處理常式動作。

屬性

適用於