---
title: WKInterfaceGroup
framework: watchkit
role: symbol
role_heading: Class
path: watchkit/wkinterfacegroup
---

# WKInterfaceGroup

A container for one or more interface objects.

## Declaration

```swift
class WKInterfaceGroup
```

## Overview

Overview A WKInterfaceGroup is conceptually similar to a superview in UIKit, in that it handles layout for its contained items. A group arranges items vertically or horizontally within its available space. Groups also have attributes that you can use to configure the precise placement of items within the group. You can also nest groups inside of other groups to manage more complex layouts. Do not subclass or create instances of this class yourself. Instead, define outlets in your interface controller class and connect them to the corresponding objects in your storyboard file. For example, to refer to a group object in your interface, define a property with the following syntax in your interface controller class: During the initialization of your interface controller, WatchKit creates a new instance of this class and assigns it to your outlet. At that point, you can use the object in your outlet to make changes to the group’s configuration. Interface Builder Configuration Options Xcode lets you configure information about your group interface object in your storyboard file. The following table lists the attributes you can configure in your storyboard and their meaning.  |   |   |   |   |   |   |   |   |  Overlapping Content In watchOS 4 and later, you can use groups to create overlapping content. Set the group’s Layout attribute in the Attribute inspector to Overlap (see Figure 1 ). The system positions each item in the group based on the item’s alignment attributes.

## Topics

### Setting the Group’s Content

- [setBackgroundColor(_:)](watchkit/wkinterfacegroup/setbackgroundcolor(_:).md)
- [setBackgroundImage(_:)](watchkit/wkinterfacegroup/setbackgroundimage(_:).md)
- [setBackgroundImageData(_:)](watchkit/wkinterfacegroup/setbackgroundimagedata(_:).md)
- [setBackgroundImageNamed(_:)](watchkit/wkinterfacegroup/setbackgroundimagenamed(_:).md)

### Setting the Layout Information

- [setCornerRadius(_:)](watchkit/wkinterfacegroup/setcornerradius(_:).md)
- [setContentInset(_:)](watchkit/wkinterfacegroup/setcontentinset(_:).md)

## Relationships

### Inherits From

- [WKInterfaceObject](watchkit/wkinterfaceobject.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [WKImageAnimatable](watchkit/wkimageanimatable.md)

## See Also

### Containers

- [WKInterfaceSeparator](watchkit/wkinterfaceseparator.md)
- [WKInterfaceTable](watchkit/wkinterfacetable.md)
- [WKInterfacePicker](watchkit/wkinterfacepicker.md)
