Edit

Share via


UITableView.InsertSections(NSIndexSet, UITableViewRowAnimation) Method

Definition

Inserts a section (or sections) from a table view, with an option to animate the operation.

[Foundation.Export("insertSections:withRowAnimation:")]
public virtual void InsertSections (Foundation.NSIndexSet sections, UIKit.UITableViewRowAnimation withRowAnimation);
abstract member InsertSections : Foundation.NSIndexSet * UIKit.UITableViewRowAnimation -> unit
override this.InsertSections : Foundation.NSIndexSet * UIKit.UITableViewRowAnimation -> unit

Parameters

sections
NSIndexSet

A set of section identifiers to insert. If a section already exists at a given index, it is moved up down one index location.

withRowAnimation
UITableViewRowAnimation

What type of animation to use when inserting the rows (eg. fade in or slide in from left)

Attributes

Remarks

UITableView calls the relevant UITableViewSource methods immediately afterwards to get the cells and other content to display the visible rows.

When this method is called inside an animation block defined by BeginUpdates() and EndUpdates(), any insertions of rows or sections are deferred until after deletions have been processed. This happens regardless of the ordering of the insertion and deletion method calls within the animation block.

Applies to