Skip to content

SearchBar Cancel tap causes panel to dismiss #248

@swiftymf

Description

@swiftymf

I have a searchBar in the tableHeaderView. Panel moves to .full when textField becomes active. If I tap the Cancel button the panel slides completely off the screen. As far as I can tell my code is almost identical to the Maps Sample project with similar functionality. I've checked delegates, positions when cancel is pressed, etc. If I change the position from .full to .half in searchBarTextDidBeginEditing it will change when I run the project. However when I make any change to searchBarCancelButtonClicked it will still fully slide the panel off the screen. I put a print statement in searchBarCancelButtonClicked to make sure it gets called when the button is pressed and it does. Not sure where else it would be dismissing the entire panel. Thanks in advance for your help and this awesome library!

EDIT: by setting definesPresentationContext to false, pressing Cancel on the searchBar now allows the tableView to go to .half position. However, if the searchBar's textField is active and you attempt to drag the view down manually, the searchBar stays at the top of the screen while the rest of the view slides down.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions