var memo: String? @IBOutlet weak var memoTextField: UITextField! @IBOutlet weak var saveButton: UIBarButtonItem! override func viewDidLoad() { super.viewDidLoad() self.saveButton.isEnabled = false // Do any additional setup after loading the view. } @IBAction func memoTextFieldChanged(_ sender: Any) { let memo = self.memoTextField.text ?? "" self.saveButton.isEnabled = !memo.isEmpty } @IBAction func cancel(_ sender: Any) { self.dismiss(animated: true, completion: nil) } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } override func prepare(for segue: UIStoryboardSegue, sender: Any?) { guard let button = sender as? UIBarButtonItem, button === self.saveButton else{ return } self.memo = self.memoTextField.text ?? "" }
oh my goodness
i dont understand whats going on