Table of Contents

Class NSLayoutAnchor<TAnchor>

Namespace
CarinaStudio.MacOS.AppKit
Assembly
CarinaStudio.AppBase.MacOS.dll

NSLayoutAnchor.

public class NSLayoutAnchor<TAnchor> : NSObject, IDisposable, IEquatable<NSObject> where TAnchor : NSLayoutAnchor<TAnchor>

Type Parameters

TAnchor
Inheritance
NSLayoutAnchor<TAnchor>
Implements
Derived
Inherited Members
Extension Methods

Constructors

NSLayoutAnchor(Class, IntPtr, bool)

Initialize new NSLayoutAnchor<TAnchor> instance.

protected NSLayoutAnchor(Class cls, IntPtr handle, bool ownsInstance)

Parameters

cls Class

Class of instance.

handle nint

Handle of instance.

ownsInstance bool

True to own the instance.

NSLayoutAnchor(IntPtr, bool, bool)

Initialize new NSLayoutAnchor<TAnchor> instance.

protected NSLayoutAnchor(IntPtr handle, bool verifyClass, bool ownsInstance)

Parameters

handle nint

Handle of instance.

verifyClass bool

True to verify whether instance is NSLayoutAnchor or not.

ownsInstance bool

True to own the instance.

Properties

Item

Get object which is used to calculate the anchor’s position.

public NSObject? Item { get; }

Property Value

NSObject

Name

Get name of anchor.

public string Name { get; }

Property Value

string

Methods

ConstraintEqualTo(NSLayoutAnchor<TAnchor>)

Define constraint.

public NSLayoutConstraint ConstraintEqualTo(NSLayoutAnchor<TAnchor> another)

Parameters

another NSLayoutAnchor<TAnchor>

Returns

NSLayoutConstraint

Constraint.

ConstraintEqualToWithConstant(NSLayoutAnchor<TAnchor>, float)

Define constraint.

public NSLayoutConstraint ConstraintEqualToWithConstant(NSLayoutAnchor<TAnchor> another, float offset)

Parameters

another NSLayoutAnchor<TAnchor>
offset float

Returns

NSLayoutConstraint

Constraint.

ConstraintGreaterThanOrEqualTo(NSLayoutAnchor<TAnchor>)

Define constraint.

public NSLayoutConstraint ConstraintGreaterThanOrEqualTo(NSLayoutAnchor<TAnchor> another)

Parameters

another NSLayoutAnchor<TAnchor>

Returns

NSLayoutConstraint

Constraint.

ConstraintGreaterThanOrEqualToWithConstant(NSLayoutAnchor<TAnchor>, float)

Define constraint.

public NSLayoutConstraint ConstraintGreaterThanOrEqualToWithConstant(NSLayoutAnchor<TAnchor> another, float offset)

Parameters

another NSLayoutAnchor<TAnchor>
offset float

Returns

NSLayoutConstraint

Constraint.

ConstraintLessThanOrEqualTo(NSLayoutAnchor<TAnchor>)

Define constraint.

public NSLayoutConstraint ConstraintLessThanOrEqualTo(NSLayoutAnchor<TAnchor> another)

Parameters

another NSLayoutAnchor<TAnchor>

Returns

NSLayoutConstraint

Constraint.

ConstraintLessThanOrEqualToWithConstant(NSLayoutAnchor<TAnchor>, float)

Define constraint.

public NSLayoutConstraint ConstraintLessThanOrEqualToWithConstant(NSLayoutAnchor<TAnchor> another, float offset)

Parameters

another NSLayoutAnchor<TAnchor>
offset float

Returns

NSLayoutConstraint

Constraint.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.