Found a solution on StackOverflow let searchTextField = self.searchBar.valueForKey("_searchField") as! UITextField