Compartilhar via


UICollectionView.SetCollectionViewLayout Método

Definição

Sobrecargas

SetCollectionViewLayout(UICollectionViewLayout, Boolean)

Altera o UICollectionViewLayout usado pelo UICollectionView.

SetCollectionViewLayout(UICollectionViewLayout, Boolean, UICompletionHandler)

Define o layout usado por este 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

Parâmetros

animated
Boolean

true se a transição para o novo layout deve ser animada.

Atributos

Comentários

Um UICollectionView deve ter sua CollectionViewLayout atribuição antes de ser exibido. O desenvolvedor do aplicativo deve instanciar o UICollectionView com o construtor C:UIKit.UICollectionView.UICollectionView(System.Drawing.RectangleF, UIKit.UICollectionViewLayout) ou chamar esse método antes de exibir o UICollectionView.

Aplica-se a

SetCollectionViewLayout(UICollectionViewLayout, Boolean, UICompletionHandler)

Define o layout usado por este 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

Parâmetros

animated
Boolean

true se a transição para o novo layout deve ser animada.

completion
UICompletionHandler

Uma ação do manipulador de conclusão a ser executada após a conclusão de todas as outras operações.

Atributos

Aplica-se a