I am trying to develop an app easy game. And in my design(using xcode swift 4.x) I have a button. But this button actually a 3 different button evert time pressed the button will change its status and action ofcourse. I tried some if - else statements but can't find any way. Any suggestion or any knowledge how to achieve this kind of code. Thanks anyway. Have a nice codes.

Code I wrote

```
    @IBAction func btnUncoverQuestion(_ sender: RoundedButton) {
    btnUncoverQuestion.setTitle(questionArray?[questionNumber].title ?? "No question here", for: .normal)
    btnState = btnState + 1
    if btnState == 1 {
        sender.setTitle("Başlat", for: .normal)
        sender.setTitleColor(UIColor.flatWhite, for: .normal)
        startTimer()

        btnState += 1

        if btnState == 2 {
            btnState = 0
            sender.setTitle("Tamam", for: .normal)
            sender.setTitleColor(UIColor.flatWhite, for: .normal)
            stopTimer()
            let alert = UIAlertController(title: "Sizce cevap doğru mu", message: "Seçimin yap", preferredStyle: .alert)
            alert.addAction(UIAlertAction(title: "Doğru", style: .default, handler: { (trueAction) in
                self.playerArray[self.turn].point += 1
                self.turn += 1
                self.updateQuestionScreen(button: sender)
            }))
            alert.addAction(UIAlertAction(title: "Yanlış", style: .default, handler: { (wrongAction) in
                self.turn += 1
                self.updateQuestionScreen(button: sender)
            }))
        }
    }
}

```