UICollectionView.SelectItem Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Selects a UICollectionViewCell and optionally scrolls to make it visible.
[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
Parameters
- indexPath
- NSIndexPath
The NSIndexPath of the desired element.
- animated
- Boolean
true
if the selection change should be animated.
- scrollPosition
- UICollectionViewScrollPosition
Where the item should be positioned after scrolling finishes.
- Attributes
Remarks
This method does nothing if AllowsSelection is false
. This method deselects the currently selected element if AllowsMultipleSelection is false
.
This method does not trigger calls to any selection-related delegate methods (e.g., ItemSelected(UICollectionView, NSIndexPath) or ItemDeselected(UICollectionView, NSIndexPath)).