I am trying to add an optional 2nd trailing constraint so that my textfield stretches/widens to occupy the space where a button would be when the button is not hidden & disabled
create an outlet for the constraint of the button (command drag to view controller)
then where appropriate (that is if you are adding to switch case, or adding within viewDidLoad, etc.):
"textFieldOutlet".trailingAnchor.constraint(equalTo:"buttonOutlet".trailingAnchor).isActive = true