Skip to content

uheiyohei/TFAlertController

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TFAlertController

Carthage compatible

About

TFAlertController is a framework of an alert view with text field for iOS.

Image

Installation

Carthage

Add the following line to your Cartfile.

github "uheiyohei/TFAlertController"

Usage

import TFAlertController

let alertController = TFAlertController(title: "Title", description: "The description of the alert." handler: {
  (text: String) in
  label.text = text // You can get the text written in the field.
})

// The parts on the alert view are customizable.
alertController.alertView.textField.text = "Default text"
alertController.alertView.doneButton.setTitle("OK", for: .normal)

self.present(alertController, animated: true, completion: nil)
  • The description and the handler are optional.
  • The parts on the alert view are completely customizable.(e.g. title label, text field, "Done" button, etc.)