1、如果需要對搜索結果的點擊事件進行處理,建議新建一個tableViewController,用於展示搜索結果。
2、如果導航欄隱藏,搜索結果tableView會與searchBar有一定的距離,這個是導航欄的距離,在搜索結果頁面的viewWillAppear方法里,把tableView的frame的y,改為-44就行了。
3、如果沒有新建搜索結果controller,而是直接在當前頁面,根據searchController的active來判斷顯示結果,那么,從搜索結果界面直接pop回上個頁面之后,可能會顯示有搜索框,因為searchController還在