SimpleAlert

        let alert = SimpleAlertViewController(title: "Alert Title", message: "text text text")
        
        alert.addTextField(textField: UITextField())
        alert.addAction(action: SimpleAlertAction(title: "textfield value", type: .default, action: {
            guard let fieldText = alert.textFields[0].text else { return }
            print(fieldText)
        }))
        alert.addAction(action: SimpleAlertAction(title: "cancel", type: .cancel, action: {
            print("cancel action")
        }))
        self.present(alert, animated: true)

screenshot

GitHub

View Github