Mac Guides | Samples

MonoMac.Foundation.NSIndexPath Class

Represents the path to a node in a tree. In iOS this class is most commonly used to identify a row in a UITableView.

See Also: NSIndexPath

Syntax

[MonoMac.Foundation.Register("NSIndexPath", true)]
public class NSIndexPath : NSObject

Remarks

The API used in iOS with UITableView consists of a static method to create new objects and two properties. The NSIndexPath.FromRowSection(Int32,Int32) method creates a new instance from row and section numbers. The properties NSIndexPath.Row and NSIndexPath.Section return the relevant values from populated instances.

This class has other uses beyond UITableView, which would involve using the rest of the class's properties and methods.

Related content

Requirements

Namespace: MonoMac.Foundation
Assembly: XamMac (in XamMac.dll)
Assembly Versions: 0.0.0.0

The members of MonoMac.Foundation.NSIndexPath are listed below.

See Also: NSObject

Public Constructors

Default constructor that initializes a new instance of this class with no parameters.
A constructor that initializes the object from the data stored in the unarchiver object.
Constructor to call on derived classes when the derived class has an [Export] constructor.
A constructor used when creating managed representations of unmanaged objects; Called by the runtime.

Public Properties

[read-only]
override
ClassHandleIntPtr. The handle for this class.
[read-only]
LengthInt32. The number of indexes in the index-path (not required for use with iOS UITableView).

Public Methods

Compare(NSIndexPath) : Int32
Indicates the depth-first traversal order of this object compared to other (not required for use with iOS UITableView).
static
Create(params Int32[]) : NSIndexPath
Create a new index-path object with the specified objects (not required for use with iOS UITableView).
static
Create(params UInt32[]) : NSIndexPath
Create a new index-path object with the specified objects (not required for use with iOS UITableView).
override
Equals(Object) : Boolean
Returns true if this object is equivalent to obj.
static
FromIndex(UInt32) : NSIndexPath
Create a new index-path object with the specified object (not required for use with iOS UITableView).
FromIndexes(UInt32[]) : NSIndexPath
Create a new index-path object with the specified objects (not required for use with iOS UITableView).
override
GetHashCode() : Int32
Generates a hash code for the current instance.
GetIndexes() : UInt32[]
Copies the objects contained in the index-path to an array (not required for use with iOS UITableView).
IndexAtPosition(Int32) : UInt32
Return the index at the given position in the index-path (not required for use with iOS UITableView).
IndexPathByAddingIndex(UInt32) : NSIndexPath
Returns a new index-path containing those in this object plus the new index (not required for use with iOS UITableView).
IndexPathByRemovingLastIndex() : NSIndexPath
Returns a new index-path with the last one removed (not required for use with iOS UITableView).