 {
     func textFieldShouldBeginEditing(_ textField: UITextField) -> Bool {
         // Disable Add/Delete Category action
-        categoryAction?.isEnabled = false
+        renameAction?.isEnabled = false
         deleteAction?.isEnabled = false
         return true
     }

    @objc var albumData: PiwigoAlbumData?
    
    private var tableView: UITableView?
    private var categoryAction: UIAlertAction?
    private var deleteAction: UIAlertAction?

    override init(frame: CGRect) {

                   replacementString string: String) -> Bool {
        // Enable Add/Delete Category action if text field not empty
        let finalString = (textField.text as NSString?)?.replacingCharacters(in: range, with: string)
        renameAction?.isEnabled = (finalString?.count ?? 0) >= 1
        deleteAction?.isEnabled = (finalString?.count ?? 0) >= 1
        return true
    }

    func textFieldShouldClear(_ textField: UITextField) -> Bool {
        // Disable Add/Delete Category action
        renameAction?.isEnabled = false
        deleteAction?.isEnabled = false
        return true
    }
