<!--
{
  "availability" : [
    "macOS: 10.11.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSLayoutDimension/constraint(greaterThanOrEqualTo:multiplier:constant:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSLayoutDimension(im)constraintGreaterThanOrEqualToAnchor:multiplier:constant:"
  },
  "title" : "constraint(greaterThanOrEqualTo:multiplier:constant:)"
}
-->

# constraint(greaterThanOrEqualTo:multiplier:constant:)

Returns a constraint that defines the anchor’s size attribute as greater than or equal to the specified anchor multiplied by the constant plus an offset.

```
func constraint(greaterThanOrEqualTo anchor: NSLayoutDimension, multiplier m: CGFloat, constant c: CGFloat) -> NSLayoutConstraint
```

## Parameters

`anchor`

A dimension anchor from an [`NSView`](/documentation/AppKit/NSView) or [`NSLayoutGuide`](/documentation/AppKit/NSLayoutGuide) object.

`m`

The multiplier constant for the constraint.

`c`

The constant offset for this relationship.

## Return Value

An [`NSLayoutConstraint`](/documentation/AppKit/NSLayoutConstraint) object that defines the attribute represented by this layout anchor as greater than or equal to the attribute represented by the `anchor` parameter multiplied by the `m` constant plus the constant `c`.

## Discussion

This method defines the relationship `first attribute >= (m * second attribute) + c`. Where `first attribute` is the layout attribute represented by the anchor receiving this method call, and `second attribute` is the layout attribute represented by the `anchor` parameter.

The constraints produced by the following two examples are identical.

```objc
// Creating a constraint using NSLayoutConstraint
[NSLayoutConstraint
 constraintWithItem:self.button
 attribute:NSLayoutAttributeWidth
 relatedBy:NSLayoutRelationGreaterThanOrEqual
 toItem:self.button
 attribute:NSLayoutAttributeHeight
 multiplier:2.0
 constant:40.0].active = YES;
 
// Creating the same constraint using constraintGreaterThanOrEqualToAnchor:multiplier:constant:
[self.button.widthAnchor constraintGreaterThanOrEqualToAnchor:self.button.heightAnchor multiplier:2.0 constant: 40.0].active = YES;
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)