                         }
                         self.storedShows.append(showObject!)
                         self.storedShows.sort {$0.name < $1.name}
+                        self.shows = self.storedShows
                     }
                     self.tableview.reloadData()
                 })

    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
        return 200
    }
}

import SwiftyJSON
import UserNotifications

class FavouritesViewController: UIViewController, UITableViewDelegate, UITableViewDataSource, UISearchBarDelegate{
    
    @IBOutlet weak var searchbar: UISearchBar!
    @IBOutlet weak var tableview: UITableView!
    
    var storedShows = [Show]()
    var shows        = [Show]()
    
    override func viewDidLoad() {
        super.viewDidLoad()
        searchbar.delegate = self
        let refreshControl = UIRefreshControl()
        refreshControl.addTarget(self, action: #selector(retrieveFavourites), for: .valueChanged)
        self.tableview.refreshControl = refreshControl
