UICollectionView.SelectItem メソッド

定義

UICollectionViewCellを選択し、必要に応じてスクロールして表示します。

[Foundation.Export("selectItemAtIndexPath:animated:scrollPosition:")]
public virtual void SelectItem (Foundation.NSIndexPath indexPath, bool animated, UIKit.UICollectionViewScrollPosition scrollPosition);
abstract member SelectItem : Foundation.NSIndexPath * bool * UIKit.UICollectionViewScrollPosition -> unit
override this.SelectItem : Foundation.NSIndexPath * bool * UIKit.UICollectionViewScrollPosition -> unit

パラメーター

indexPath
NSIndexPath

NSIndexPath目的の要素の 。

animated
Boolean

true 選択の変更をアニメーション化する必要がある場合は 。

scrollPosition
UICollectionViewScrollPosition

スクロールが完了した後に項目を配置する場所。

属性

注釈

が の場合 AllowsSelection 、このメソッドは false何も行いません。 このメソッドは、 が falseの場合AllowsMultipleSelection、現在選択されている要素の選択を解除します。

このメソッドは、 ItemSelected(UICollectionView, NSIndexPath) 選択に関連するデリゲート メソッド (、、 ItemDeselected(UICollectionView, NSIndexPath)など) の呼び出しをトリガーしません。

適用対象