UICollectionView.SetCollectionViewLayout 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
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
參數
- layout
- UICollectionViewLayout
- 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
參數
- layout
- UICollectionViewLayout
- animated
- Boolean
true
如果轉換至新版面配置應該以動畫顯示,則為 。
- completion
- UICompletionHandler
完成所有其他作業之後要執行的完成處理常式動作。
- 屬性