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

# setHidden(_:)

Hides or shows the interface object in your user interface.

```
func setHidden(_ hidden: Bool)
```

## Parameters

`hidden`

A Boolean value indicating the visibility of the object. Specify <doc://com.apple.documentation/documentation/Swift/true> to hide the object. Specify <doc://com.apple.documentation/documentation/Swift/false> to show it.

## Discussion

When you hide or show an object in your interface, WatchKit makes a note to update the layout during the next refresh cycle. During that cycle, WatchKit adjusts the layout to display only the currently visible objects.

## See Also

  [App Programming Guide for watchOS](https://developer.apple.com/library/archive/documentation/General/Conceptual/WatchKitProgrammingGuide/index.html#//apple_ref/doc/uid/TP40014969)



---

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)