K
ac.addTextField { (textField)
in
textField?.keyboardType = .emailAddress
textField?.font = UIFont.appFontRegularWithSize(17)
textField?.placeholder = "Email"
textField?.borderStyle = .roundedRect
textField?.autocorrectionType = .no
textField?.autocapitalizationType = .none
}
let acceptAction = EMAlertAction(title: "Invite", style: .normal) {
guard
let email = ac.textFields.first?.text?.trimmingCharacters(in: .whitespacesAndNewlines)
else {
return }
// …
}