NSLayoutConstraint.FirstAnchor<AnchorType> Method

Definition

For an anchor-based constraint, returns the first anchor, properly downcast to AnchorType.

public UIKit.NSLayoutAnchor<AnchorType> FirstAnchor<AnchorType>() where AnchorType : Foundation.NSObject;
public UIKit.NSLayoutAnchor<AnchorType>? FirstAnchor<AnchorType>() where AnchorType : Foundation.NSObject;
member this.FirstAnchor : unit -> UIKit.NSLayoutAnchor<'AnchorType (requires 'AnchorType :> Foundation.NSObject)> (requires 'AnchorType :> Foundation.NSObject)

Type Parameters

AnchorType

The type of anchor to return.

Returns

The first anchor of the constraint, cast to the specified anchor type.

Remarks

This method is useful for retrieving the first anchor when working with anchor-based constraints.

Applies to