The tag value is an Integer:
UIButton *button=[UIButton buttonWithType:UIButtonTypeCustom];
[button setTitle:addressField forState:UIControlStateNormal];
[bu
Probably not best practice, but one simple way to pass a string with UIButton is to store it in the accessibilityIdentifier property.
yourButton.accessibilityIdentifier = "Some string you want to pass"
...
@objc func tappedButton(sender: UIButton) {
print("passed string is: \(sender.accessibilityIdentifier)")
}