---
title: "setHeight(_:)"
framework: watchkit
role: symbol
role_heading: Instance Method
path: "watchkit/wkinterfaceobject/setheight(_:)"
---

# setHeight(_:)

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

## Declaration

```swift
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

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 object causes the image’s content scaling mode to change to UIView.ContentMode.scaleToFill. Changes to the height of an object are animatable.

## See Also

### Changing an Object’s Size

- [setWidth(_:)](watchkit/wkinterfaceobject/setwidth(_:).md)
- [setRelativeWidth(_:withAdjustment:)](watchkit/wkinterfaceobject/setrelativewidth(_:withadjustment:).md)
- [setRelativeHeight(_:withAdjustment:)](watchkit/wkinterfaceobject/setrelativeheight(_:withadjustment:).md)
- [sizeToFitWidth()](watchkit/wkinterfaceobject/sizetofitwidth().md)
- [sizeToFitHeight()](watchkit/wkinterfaceobject/sizetofitheight().md)
