Select/deselect checkbox buttons in Swift 3 : How to know my button selected or not in swift 3 `.selected` property  not found.

when i type ButtonName.selected not found in Swift 3 (Xcode 8.0)

     if let button = sender as? UIButton {
            if button.selected {
                // set selected
                button.selected = true
            } else {
                // set deselected
                button.selected = false
            }
        }