     private var searchBar: UISearchBar?
 
     var isSearchBarVisible = false
+    var isSearching = false
 
     lazy private var statusBarHeight: CGFloat = {
         return UIApplication.sharedApplication().statusBarFrame.height

                if let flashcards = try dataManager?.flashcards(forDeckWithId: deck.id) {

					if let bar = searchBar {
                        hideSearchBar(-topItemOffset)
        			}
                   
                    let alert = UIAlertController(title: "Test or Learn?", message: "Choose the mode which you would like to start", preferredStyle: .Alert)


import UIKit

class DecksViewController: StudyBoxViewController, UICollectionViewDelegate, UICollectionViewDataSource, UIGestureRecognizerDelegate {
    
    private var decksArray: [Deck]?
    private var searchDecks: [Deck]?
