共用方式為


UICollectionView.SetCollectionViewLayoutAsync 方法

定義

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

[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 7, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual System.Threading.Tasks.Task<bool> SetCollectionViewLayoutAsync (UIKit.UICollectionViewLayout layout, bool animated);
abstract member SetCollectionViewLayoutAsync : UIKit.UICollectionViewLayout * bool -> System.Threading.Tasks.Task<bool>
override this.SetCollectionViewLayoutAsync : UIKit.UICollectionViewLayout * bool -> System.Threading.Tasks.Task<bool>

參數

layout
UICollectionViewLayout

新的 。

animated
Boolean

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

傳回

表示非同步 SetCollectionViewLayout 作業的工作。 TResult 參數的值是 UICompletionHandler

屬性

備註

SetCollectionViewLayoutAsync 方法適合與 C# 非同步搭配使用,方法是將控制項傳回給代表作業之 Task 的呼叫端。

即將加入。

適用於