<!--
{
  "availability" : [
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WatchKit",
  "identifier" : "/documentation/WatchKit/WKInterfaceObject/setRelativeHeight(_:withAdjustment:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "WatchKit"
    ],
    "preciseIdentifier" : "c:objc(cs)WKInterfaceObject(im)setRelativeHeight:withAdjustment:"
  },
  "title" : "setRelativeHeight(_:withAdjustment:)"
}
-->

# setRelativeHeight(_:withAdjustment:)

Sets the height of the object relative to its container.

```
func setRelativeHeight(_ height: CGFloat, withAdjustment adjustment: CGFloat)
```

## Parameters

`height`

The height of the object relative to its immediate container. This value represents the percentage of the container’s height. This value must be between `0.0` and `1.0`, and values outside of that range are clamped to the minimum or maximum value.

`adjustment`

The amount (in points) to add or subtract from the relative height. Positive values increase the height of the item and negative values decrease it.

## Discussion

You can’t use this method to alter the height of tables or separator items. Changes to the height of an object are animatable.

---

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)