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
本文介绍了解决UISearchController点击时向上瞬移再过渡到搜索模式的问题。通过设置self.definesPresentationContext=YES,避免了导航栏提供的context导致搜索框瞬移的现象。
987

被折叠的 条评论
为什么被折叠?



