Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if event is already registered #53

Open
HosseinArabbeigi opened this issue Feb 9, 2021 · 4 comments
Open

Check if event is already registered #53

HosseinArabbeigi opened this issue Feb 9, 2021 · 4 comments

Comments

@HosseinArabbeigi
Copy link

I think this will be great if have a isRegisterd method to prevent registering for an instance multiple times.

@cesarferreira
Copy link
Owner

Hi,
I don't really have time to add features to this project, if you want to please open a pull request and I'll review it, thanks.

@HosseinArabbeigi
Copy link
Author

Sure, I will just a few days.

@mhmdgoma
Copy link

mhmdgoma commented Jul 6, 2021

open class func isRegistered(_ target: AnyObject, name: String) -> Bool {
    let id = UInt(bitPattern: ObjectIdentifier(target))
    return ((Static.instance.cache[id]?.filter { $0.name == name }) != nil)
}

@dan085
Copy link

dan085 commented Jul 27, 2021

@mhmdgoma hello!! this code not working when check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants