I\'m developing note app, when the text view is empty the done button should be disabled so user could not be able to save empty notes into data base, else the button should be
Try this in textViewDidChange method:
textViewDidChange
yourBarButtonItem.isEnabled = !(yourTextField.text?.isEmpty ?? false)