louisdh / panelkit

A UI framework that enables panels on iOS.
MIT License
3.79k stars 159 forks source link

Run code when panel will close #23

Open Kamik423 opened 6 years ago

Kamik423 commented 6 years ago

Is there any way of executing code when a panel closes? I tried overriding different methods I can see in the open source code, but most are in extensions and so not overridable. I tried overriding viewWillDisappear, which gets called every time a panel pins/floats/unpins. I also tried adding a custom done button, however that one got removed and replaced with the PanelKit one.

Is there a way to run code when the close button gets pressed, or could you add that functionality?

louisdh commented 6 years ago

It would probably make sense to add some functions to a delegate regarding panelDidClose or panelDidFloat. Good idea!

kbilyk commented 6 years ago

@louisdh I've faced same issue as I need to update selected state of button that called panel if panel was closed using "Close" button inside panel.

What is ETA for this feature? If you need help, please ping me I might contribute.

omiz commented 5 years ago

I added this pull request to manage the appearance of the panel