---
title: isSelected
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uicontrol/isselected
---

# isSelected

A Boolean value indicating whether the control is in the selected state.

## Declaration

```swift
var isSelected: Bool { get set }
```

## Discussion

Discussion Set the value of this property to true to select it or false to deselect it. Most controls don’t modify their appearance or behavior when selected, but some do. For example, the UISegmentedControl class tracks whether a segment is selected and draws it differently when it is. The default value of this property is false for a newly created control. You can set a control’s initial selected state in your storyboard file.

## See Also

### Managing state

- [state](uikit/uicontrol/state-swift.property.md)
- [UIControl.State](uikit/uicontrol/state-swift.struct.md)
- [isEnabled](uikit/uicontrol/isenabled.md)
- [isHighlighted](uikit/uicontrol/ishighlighted.md)
