Modifica

Condividi tramite


UITextView.GetPosition Method

Definition

Overloads

GetPosition(UITextPosition, nint)

Returns a second position that is offset from the specified position.

GetPosition(UITextRange, nint)

Returns a position within a document relative to the start of withinRange.

GetPosition(UITextPosition, UITextLayoutDirection, nint)

Returns a second position in a document the direction and offset relative to the first position.

GetPosition(UITextPosition, nint)

Returns a second position that is offset from the specified position.

[Foundation.Export("positionFromPosition:offset:")]
public virtual UIKit.UITextPosition GetPosition (UIKit.UITextPosition fromPosition, nint offset);
abstract member GetPosition : UIKit.UITextPosition * nint -> UIKit.UITextPosition
override this.GetPosition : UIKit.UITextPosition * nint -> UIKit.UITextPosition

Parameters

fromPosition
UITextPosition

A position within a document.

offset
System.System.IntPtr System.nativeint

A positive or negative character offset relative to fromPosition.

Returns

Implements

Attributes

Remarks

May be null if the computed position is less than zero or greater than the length of the text in the document.

Applies to

GetPosition(UITextRange, nint)

Returns a position within a document relative to the start of withinRange.

[Foundation.Export("positionWithinRange:atCharacterOffset:")]
public virtual UIKit.UITextPosition GetPosition (UIKit.UITextRange withinRange, nint atCharacterOffset);
abstract member GetPosition : UIKit.UITextRange * nint -> UIKit.UITextPosition
override this.GetPosition : UIKit.UITextRange * nint -> UIKit.UITextPosition

Parameters

withinRange
UITextRange

A range of text in a document.

atCharacterOffset
System.System.IntPtr System.nativeint

An offset relative to the start of the withinRange.

Returns

Attributes

Applies to

GetPosition(UITextPosition, UITextLayoutDirection, nint)

Returns a second position in a document the direction and offset relative to the first position.

[Foundation.Export("positionFromPosition:inDirection:offset:")]
public virtual UIKit.UITextPosition GetPosition (UIKit.UITextPosition fromPosition, UIKit.UITextLayoutDirection inDirection, nint offset);
abstract member GetPosition : UIKit.UITextPosition * UIKit.UITextLayoutDirection * nint -> UIKit.UITextPosition
override this.GetPosition : UIKit.UITextPosition * UIKit.UITextLayoutDirection * nint -> UIKit.UITextPosition

Parameters

fromPosition
UITextPosition

The first position.

inDirection
UITextLayoutDirection

The direction to calculate the offset from.

offset
System.System.IntPtr System.nativeint

The offset to use.

Returns

Implements

Attributes

Applies to