checking UIButton Title in Swift you should use button1.currentTitle also you should use sender.currentTitle