UITableView.MoveSection(nint, nint) Method

Definition

Moves a section to a new location in the table view.

[Foundation.Export("moveSection:toSection:")]
public virtual void MoveSection (nint fromSection, nint toSection);
abstract member MoveSection : nint * nint -> unit
override this.MoveSection : nint * nint -> unit

Parameters

fromSection
System.System.IntPtr System.nativeint

Index of the section to move.

toSection
System.System.IntPtr System.nativeint

Destination index for the section. The section currently at this index is moved up or down to accomodate the moved section.

Attributes

Remarks

This method can be combined with other MoveSection, InsertSections(NSIndexSet, UITableViewRowAnimation) and DeleteSections(NSIndexSet, UITableViewRowAnimation) operations within an animation block defined by BeginUpdates() and EndUpdates(), so that all the changes occur in a single animation.

Unlike the insertion and deletion methods, moving a section does not use an animation paramter. Moved sections always animate straight from their starting position to their new position. Only one section can be moved per method call, however to move multiple sections application developers can call this method repeatedly within a BeginUpdates()-EndUpdates() animation block.

Applies to