DialogTitleValueViewController

class DialogTitleValueViewController : DialogViewController
extension DialogTitleValueViewController: UITextFieldDelegate

Dialog with two text fields: one for the title/name and another for the value.

Basic alternative to the system UIAlertController.

  • Text field to input a desired name.

    Declaration

    Swift

    let titleTextField: UITextField
  • Text field to input a desired value.

    Declaration

    Swift

    let valueTextField: UITextField
  • Success button title.

    Declaration

    Swift

    let successButtonTitle: String
  • Cancel button title.

    Declaration

    Swift

    let cancelButtonTitle: String
  • Completion handler of type CompletionHandler.

    Declaration

    Swift

    var completionHandler: CompletionHandler?
  • Background color of the success button.

    Declaration

    Swift

    var successColor: UIColor { get set }
  • Creates a DialogTitleValueViewController with two text fields.

    Note

    First text field is for the title/name. The second text field is for the value.

    Declaration

    Swift

    init(title: String, successButtonTitle: String? = nil, cancelButtonTitle: String? = nil, completion: (CompletionHandler)? = nil)

    Parameters

    title

    Title of the dialog.

    successButtonTitle

    Title for the success button. nil by default.

    cancelButtonTitle

    Title for the cancel button. nil by default.

    completion

    Completion handler with the title string. If it’s nil then the dialog was cancelled. nil by default.