ios - UISearchBar doesn't dismiss on push segue -


i'm trying out uisearchcontroller ios 8 right now. when click cell, push segue , show view controller. however, search controller/bar still there on next controller. also, notice status bar background white, while should grey searchbar background color grey. there miss?

this codes used initialise search controller

override func viewdidload() {     super.viewdidload()     // additional setup after loading view, typically nib.      searchcontroller = uisearchcontroller(searchresultscontroller: nil)     searchcontroller.searchresultsupdater = self     searchcontroller.hidesnavigationbarduringpresentation = false     searchcontroller.dimsbackgroundduringpresentation = false     searchcontroller.searchbar.sizetofit()     tableview.tableheaderview = searchcontroller.searchbar } 

screenshot:

enter image description here

manual stop uisearchcontroller in prepareforsegue

searchcontroller.active = false 

or add in viewdidload

   searchcontroller.definespresentationcontext = true 

Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -