繁体   English   中英

搜索栏取消按钮按下初始视图控制器

[英]search bar cancel button push to initial view controller

我一直在寻找并且无法使其发挥作用。

TableviewcontrollerA searchbar将TableviewcontrollerB作为firstresponder

当用户点击取消时,我想回到TableviewcontrollerA

我在下面的方法中尝试了很多东西而没有运气。 我错过了什么?

谢谢BTW - segue是在IB上完成的,而不是代码

-(void) searchBarCancelButtonClicked:(UISearchBar *)searchBar{


}
-(void) searchBarCancelButtonClicked:(UISearchBar *)searchBar{
    [self.searchDisplayController setActive:NO animated:YES];
    self.navigationController popToViewController:UIViewControllerA animated:YES;
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM