UITableView.SelectRow(NSIndexPath, Boolean, UITableViewScrollPosition) 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 the given row, optionall scrolling the row to a specific location.
[Foundation.Export("selectRowAtIndexPath:animated:scrollPosition:")]
public virtual void SelectRow (Foundation.NSIndexPath indexPath, bool animated, UIKit.UITableViewScrollPosition scrollPosition);
abstract member SelectRow : Foundation.NSIndexPath * bool * UIKit.UITableViewScrollPosition -> unit
override this.SelectRow : Foundation.NSIndexPath * bool * UIKit.UITableViewScrollPosition -> unit
Parameters
- animated
- Boolean
true
to animate the selection and position change, false
if the change should occur immediately.
- scrollPosition
- UITableViewScrollPosition
Position that the selected row should be scrolled to (top, middle, bottom).
- Attributes
Examples
Passing None. will result in no scrolling (despite that constant normally causing minimal scrolling). To scroll to the newly selected row with minimum scrolling, select the row using this method with None then call ScrollToRow(NSIndexPath, UITableViewScrollPosition, Boolean) also with None.
NSIndexPath rowToSelect; // assume this is valid
UITableView myTableView; // assume this is valid
myTableView.SelectRow (rowToSelect, true, UITableViewScrollPosition.None);
myTableView.ScrollToRow (rowToSelect, UITableViewScrollPosition.None, true);
Remarks
Calling this method does not trigger WillSelectRow(UITableView, NSIndexPath) nor will it send SelectionDidChangeNotification notifications.