Skip to content

Add dismissHandler to BLTNItemManager #199

@JCsplash

Description

@JCsplash

Hi @alexisakers thanks for the great library!

Recently, I needed to know when a BLTNItemManager has dismissed and didn't want to implement a dismiss handler and every BLTNItem so I added a publicly accessible dismissHandler to the BLTNItemManager class. I would make a PR but since it's a small addition, thought Id just comment the code here.

@objc public final class BLTNItemManager: NSObject {

    /// Executes custom function when BLTNItemManager is dismissed
    public var dismissHandler: (() -> Void)?

}
    @nonobjc func completeDismissal() {
    
        // Calling BLTNManager's Main Dismiss Block (Set by User)
        dismissHandler?()

}

I followed the logic in this S/O answer: https://stackoverflow.com/a/45619821/8074346

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