I'm trying to make my font size larger in the textField that is currently placed within an alert:
func showAlert() {
let ac = UIAlertController(title: "Title", message: "Message", preferredStyle: .alert)
// Add text field
ac.addTextField(configurationHandler: { textField in
let heightConstraint = NSLayoutConstraint(item: textField, attribute: .height, relatedBy: .equal, toItem: nil, attribute: .notAnAttribute, multiplier: 1, constant: 100)
textField.addConstraint(heightConstraint)
textField.minimumFontSize = 100
})
Change textField.minimumFontSize = 100
line to textField.font = UIFont(name: "*whateverFontNameYouAreUsing*", size: 30)
. Let me know if this worked. Thanks.