---
title: WKInterfaceButton
framework: watchkit
role: symbol
role_heading: Class
path: watchkit/wkinterfacebutton
---

# WKInterfaceButton

A button in the user interface of your watchOS app.

## Declaration

```swift
class WKInterfaceButton
```

## Overview

Overview The content of a button’s tappable area is filled with text and an optional background color or image. When tapped by the user, the button calls its associated action method, which you define on the owning interface controller. Use that action method to initiate tasks and update your app’s interface. 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 button 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 onscreen button. To respond to taps in the button, declare a method of this form in the interface controller class that manages the button: You can change the name of your action method to anything you like. In your Xcode storyboard, connect the button’s selector to the custom action method defined in your class. Interface Builder Configuration Options Xcode lets you configure information about your button interface object in your storyboard file. The following table lists the attributes you can configure in your storyboard and their meaning.  |   |   |   |   |   |   |   |

## Topics

### Setting the Button Title

- [setTitle(_:)](watchkit/wkinterfacebutton/settitle(_:).md)
- [setAttributedTitle(_:)](watchkit/wkinterfacebutton/setattributedtitle(_:).md)

### Setting the Button Background

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

### Enabling and Disabling the Button

- [setEnabled(_:)](watchkit/wkinterfacebutton/setenabled(_:).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)

## See Also

### Controls

- [WKInterfaceLabel](watchkit/wkinterfacelabel.md)
- [WKInterfaceDate](watchkit/wkinterfacedate.md)
- [WKInterfaceTimer](watchkit/wkinterfacetimer.md)
- [WKInterfaceAuthorizationAppleIDButton](watchkit/wkinterfaceauthorizationappleidbutton.md)
- [WKInterfacePaymentButton](watchkit/wkinterfacepaymentbutton.md)
- [WKInterfaceTextField](watchkit/wkinterfacetextfield.md)
- [WKInterfaceSwitch](watchkit/wkinterfaceswitch.md)
- [WKInterfaceSlider](watchkit/wkinterfaceslider.md)
- [WKInterfaceActivityRing](watchkit/wkinterfaceactivityring.md)
- [WKInterfaceMap](watchkit/wkinterfacemap.md)
