在viewWillAppear里写: self.navigationItem.hidesSearchBarWhenScrolling = false;
在viewDidAppear里写: self.navigationItem.hidesSearchBarWhenScrolling = true;
在viewWillAppear里写: self.navigationItem.hidesSearchBarWhenScrolling = false;
在viewDidAppear里写: self.navigationItem.hidesSearchBarWhenScrolling = true;