UISearchDisplayController hiding navigation bar

前端 未结 4 627
青春惊慌失措
青春惊慌失措 2021-01-07 01:24

I am seeing a weird situation. I have put a search bar in the navigation bar and have linked a UISearchDisplayController with the search bar. Now, the search display control

4条回答
  •  伪装坚强ぢ
    2021-01-07 01:37

    In case anyone suffer from this issue.. Here comes my solution.

    -(void) viewWillDisappear:(BOOL)animated {
      [super viewWillDisappear:animated];
      // check if searchDisplayController still active..
      if ([searchDisplayController isActive]) {
        [searchDisplayController setActive:NO];
      }
    }
    

提交回复
热议问题