Simple question here. I have a UIButton, currencySelector, and I want to programmatically change the text. Here\'s what I have:
currencySelector.text = \"foo
To set a title for a button in Xcode using swift - 04: first create a method called setTitle with parameter title and UIController state like below ;
func setTitle(_ title : String?, for state : UIControl.State) {
}
and recall this method in your button action method like ;
yourButtonName.setTitle("String", for: .state)