swift compare string to button title

Swift
if myButton.currentTitle == "myString" {
  // Do something
}
Source

Also in Swift: