LoginSignup
1

More than 5 years have passed since last update.

Swift3 - UISearchBarで検索押してるのにsearchBarSearchButtonClicked呼ばれない

Posted at
class ViewController: UIViewController, UISearchBarDelegate{

UISearchBarDelegate してない

SearchBar.delegate = self してない


/*
     Searchボタンが押された時に呼ばれる
*/
    func searchBarSearchButtonClicked(_ searchBar: UISearchBar) {

        self.view.endEditing(true)
        print("反応してる?")
    }

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1