다음을 통해 공유


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아무 것도 수행하지 않습니다. 이 메서드는 가 인 경우 AllowsMultipleSelection 현재 선택된 요소의 선택을 취소합니다 false.

이 메서드는 선택 관련 대리자 메서드(예: ItemSelected(UICollectionView, NSIndexPath) 또는 ItemDeselected(UICollectionView, NSIndexPath))에 대한 호출을 트리거하지 않습니다.

적용 대상