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

# setHeight(_:)

Sets the absolute height (in points) of the object.

```
func setHeight(_ height: CGFloat)
```

## Parameters

`height`

The new height of the object. Specifying a value of `0.0` causes the item to have no height.

## Discussion

You cannot use this method to alter the height of tables or the thickness of horizontal separator items. Changing the height of a [`WKInterfaceImage`](/documentation/WatchKit/WKInterfaceImage) object causes the image’s content scaling mode to change to <doc://com.apple.documentation/documentation/UIKit/UIView/ContentMode-swift.enum/scaleToFill>.

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)