             UIUtils.hideNetworkActivityIndicator()
             activityIndicator.stopAnimating()
             generateBarButtonItem.isEnabled = true
-            updateResultsButtonState()
-        }
-    }
-    
-}
+
+            let enabled = generatedTags != nil && generatedTags!.count > 0
+            resultsBarButtonItem.isEnabled = enabled
+            saveResultsBarButtonItem.isEnabled = enabled
+        }
+    }
+    
+}

        configureUI()
    }
    
    // MARK: - Actions
    
    @IBAction func cancelDidPressed(_ sender: AnyObject) {
        dismiss(animated: true, completion: nil)
    }
    
    @IBAction func generateTags(_ sender: AnyObject) {
        setUIState(.networking)
        imaggaApiClient.taggingImage(taggingImage, success: { [weak self] tags in
            self?.processOnGeneratedTags(tags)
        }) { [weak self] error in
            self?.generatedTags = nil
            self?.setUIState(.doneWithNetworking)
            let alert = self?.alert("Error", message: error.localizedDescription, handler: nil)
            self?.present(alert!, animated: true, completion: nil)
        }
    }
    
    @IBAction func showResults(_ sender: AnyObject) {
        let tagListViewController = TagListViewController(persistenceCentral: persistenceCentral)
        
        if let createdCategory = createdCategory {
            tagListViewController.category = createdCategory
        } else {


// MARK: - ImageTaggerViewController: UIViewController, Alertable

final class ImageTaggerViewController: UIViewController, Alertable {
    
    // MARK: - Instance Variables

    /// Image for analysis and discovery.
    /// Hashtags will be generated using this image.
    var taggingImage: UIImage!

    var persistenceCentral: PersistenceCentral!
    
    private let imaggaApiClient = ImaggaApiClient.shared

    /// Generated hashtags from the `taggingImage`.
    private var generatedTags: [ImaggaTag]?

    /// Category associated with the `generatedTags`.
    private var createdCategory: Category?

    private lazy var temporaryContext: NSManagedObjectContext = {
        let context = NSManagedObjectContext(concurrencyType: .mainQueueConcurrencyType)
        context.persistentStoreCoordinator = self.persistenceCentral.coreDataStackManager.persistentStoreCoordinator

        return context
    }()
    
    // MARK: IBOutlets

    @IBOutlet var imageView: UIImageView!
    @IBOutlet var activityIndicator: UIActivityIndicatorView!
    @IBOutlet var cancelBarButtonItem: UIBarButtonItem!
    @IBOutlet var generateBarButtonItem: UIBarButtonItem!
    @IBOutlet var resultsBarButtonItem: UIBarButtonItem!
    @IBOutlet var saveResultsBarButtonItem: UIBarButtonItem!
    
    // MARK: - UIViewController lifecycle
    
    override func viewDidLoad() {
        super.viewDidLoad()
