UISearchDisplayController like in ios 7 calendar app

爱⌒轻易说出口 提交于 2019-12-11 01:59:47

问题


How to implement: I have UIBarButtonItem with search icon, after click on it, I want to show search bar in navigation bar and on click cancel button in search bar, I want to show navigation bar without search and with buttons and title like in IOS 7 calendar app.


回答1:


from apple documentation:

In iOS 7, UISearchDisplayController includes the displaysSearchBarInNavigationBar property, which you can use to put a search bar in a navigation bar, similar to the one in Calendar on iPhone:

https://developer.apple.com/library/ios/documentation/userexperience/conceptual/TransitionGuide/Bars.html



来源:https://stackoverflow.com/questions/19687938/uisearchdisplaycontroller-like-in-ios-7-calendar-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!