---
title: WKInterfaceSlider
framework: watchkit
role: symbol
role_heading: Class
path: watchkit/wkinterfaceslider
---

# WKInterfaceSlider

An interface element that lets users select a single floating-point value from a range of values.

## Declaration

```swift
class WKInterfaceSlider
```

## Overview

Overview You configure the appearance of sliders in your storyboard file, including the images to display for the minimum and maximum value. At runtime, you use a slider object to enable the slider or set its value. 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 slider 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 slider. When the user changes the value of a slider, WatchKit delivers the new value to the slider’s action method. The format of a slider’s action method is as follows: Declare a method of this form in the interface controller class used to receive the slider’s new value. You can change the method name to anything you like. When configuring the slider in Xcode, connect its selector to your custom action method. Interface Builder Configuration Options Xcode lets you configure information about your slider in your storyboard file. The following table lists the attributes you can configure in your storyboard and their meaning.  |   |   |   |   |   |   |   |   |   |

## Topics

### Setting the Slider Value

- [setValue(_:)](watchkit/wkinterfaceslider/setvalue(_:).md)
- [setColor(_:)](watchkit/wkinterfaceslider/setcolor(_:).md)
- [setNumberOfSteps(_:)](watchkit/wkinterfaceslider/setnumberofsteps(_:).md)

### Enabling the Slider

- [setEnabled(_:)](watchkit/wkinterfaceslider/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)
- [WKInterfaceButton](watchkit/wkinterfacebutton.md)
- [WKInterfaceAuthorizationAppleIDButton](watchkit/wkinterfaceauthorizationappleidbutton.md)
- [WKInterfacePaymentButton](watchkit/wkinterfacepaymentbutton.md)
- [WKInterfaceTextField](watchkit/wkinterfacetextfield.md)
- [WKInterfaceSwitch](watchkit/wkinterfaceswitch.md)
- [WKInterfaceActivityRing](watchkit/wkinterfaceactivityring.md)
- [WKInterfaceMap](watchkit/wkinterfacemap.md)
