I need to change the color of my button\'s text. I also need to change the state to Disabled after the user presses it.
I have no idea how to do this. I\'ve been loo
In swift you change color for a specific State with the setTitleColor method.
In you case it will be :
button.setTitleColor(UIColor.grayColor, forState: UIControlState.Normal)
Swift 5 Update:
button.setTitleColor(UIColor.grayColor, for: UIControl.State.normal)