Edit

Share via


UICollectionView.SetCollectionViewLayoutAsync Method

Definition

Sets the layout used by this 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>

Parameters

layout
UICollectionViewLayout

The new .

animated
Boolean

if the transition to the new layout should be animated.

Returns

A task that represents the asynchronous SetCollectionViewLayout operation. The value of the TResult parameter is a UICompletionHandler.

Attributes

Remarks

The SetCollectionViewLayoutAsync method is suitable to be used with C# async by returning control to the caller with a Task representing the operation.

To be added.

Applies to