UISearchController点击时向上瞬移一段距离然后才进行过渡动画进入搜索模式,百度了半天原来只需加上这句代码即可解决:
self.definesPresentationContext = YES;
为什么呢?点进去可以看到这个属性的注释是这样说的
Determines which parent view controller's view should be presented over for presentations of type
UIModalPresentationCurrentContext. If no ancestor view controller has this flag set, then the presenter
will be the root view controller.
网上大神这么说的
controller可以自定义子controller的集合,这样每一个controller都可以是一个container controller.
definesPresentationConte