Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. func searchBarSearchButtonClicked(_ searchBar: UISearchBar) {
  2. var sender = String()
  3. if let text = searchController.searchBar.text {
  4. sender = text
  5. }
  6. performSegue(withIdentifier: "goToWebView", sender: sender)
  7. }
  8.  
  9. override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
  10. if segue.identifier == "goToWebView" {
  11. let company = sender as! String
  12. let dvc = segue.destination as! SearchRequestReviewVC
  13. dvc.searchPhrase = company
  14. }
  15. }
  16.  
  17. override func viewDidLoad() {
  18. super.viewDidLoad()
  19. self.definesPresentationContext = true
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement