OfTheWolf / UBottomSheet

iPhone Maps App bottom sheet - A Protocol Oriented Approach
MIT License
643 stars 68 forks source link

Trigger on click in UISearch and dismiss in cancel #17

Closed isaiasmac closed 4 years ago

isaiasmac commented 4 years ago

I want to show the modal when I click in UISearchBar and hide it when I pressed the cancel button. How can I archive that ?

I'm trying to simulate a PanGesture but nothings happens.

OfTheWolf commented 4 years ago

@isaiasmac I guess you wanna show the sheet at top on search click and show at bottom on dismiss. If this is what you want you should use:

changePosition(to: .top)  //on search click
changePosition(to: .bottom) //on dismiss