CaliCastle / PopMenu

A fully customizable popup style menu for iOS 😎
https://popmenu.cali.so
MIT License
1.6k stars 182 forks source link

How to popmenu didDeselect action ? #23

Closed DGP13 closed 5 years ago

DGP13 commented 5 years ago

I'm open agin popmenu it's show me previous select action. How to diddeselect popmenu action ?

CaliCastle commented 5 years ago

Refer to documentation: https://popmenu.calicastle.com/guide/#dismissal-callback

Example:

// The manager way
manager.popMenuDidDismiss = { selected in
    // `selected` is a bool indicating if a selection has been made

    if !selected {
        // When the user tapped outside of the menu
    }
}
CaliCastle commented 5 years ago

Or actually you should use View Controller methods instead (if you're using Manager, it's not recommended): https://popmenu.calicastle.com/guide/#basic-usage-using-controller