Advertisement
Guest User

Untitled

a guest
Jul 19th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.88 KB | None | 0 0
  1. if titleAddEditTextField.text == "" || noteAddEditTextView.text == "" {
  2.             print("EMPTY STRINGS DO NOT GO BACK 😴")
  3.             let alert = UIAlertController(title: "Field Error ☚ī¸", message: "Fields must be filled in", preferredStyle: .alert)
  4.             alert.addAction(UIAlertAction(title:"Dismiss 👍", style: .default, handler: nil))
  5.             self.present(alert, animated: true)
  6.         }
  7.         else if dateAddEditPicker.date < Date() {
  8.             print("must select future date")
  9.             let alert = UIAlertController(title: "incorrect Date 📆", message: "date must be future ⏰", preferredStyle: .alert)
  10.             alert.addAction(UIAlertAction(title:"Dismiss 👍", style: .default, handler: nil))
  11.             self.present(alert, animated: true)
  12.         } else {
  13.             performSegue(withIdentifier: "unwindsegueFromAddEditVC", sender: self)
  14.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement