 	
     var newsSources = [NewsSources]()
 	var filteredTableData = [NewsSources]()
-
+	var searchText: String? = ""
+	
+	override func viewWillDisappear(animated: Bool) {
+    	super.viewWillDisappear(animated)
+		searchText = searchController.searchBar.text
+//    	searchController?.dismissViewControllerAnimated(false, completion: nil)
+		searchController.active = false
+//		searchController.searchBar.hidden = true
+  	}
+	
+	override func viewDidAppear(animated: Bool) {
+		super.viewDidAppear(animated)
+		
+		if !(searchText?.isEmpty)! {
+			searchController.searchBar.text = searchText
+			searchController.active = true
+//			searchController.searchBar.hidden = false
+		}
+	}
+	
     override func viewDidLoad() {
         super.viewDidLoad()
 		

    }
	
	func updateSearchResultsForSearchController(searchController: UISearchController) {
		filteredTableData.removeAll(keepCapacity: false)
		
        let searchPredicate = NSPredicate(format: "sourceName like[c] %@", "*" + searchController.searchBar.text! + "*")

            controller.searchBar.barTintColor = Theme.searchBarTintColor
            controller.searchBar.backgroundColor = Theme.backgroundColor
			controller.searchBar.placeholder = searchPlaceholderText
			self.tableTitleView.addSubview(controller.searchBar)
            return controller
        })()
		
//		Hides searchController but leads to blank screen when view dismissed and coming up
//		self.definesPresentationContext = true
    }
	
	func setObservers() {
