Skip to content
This repository has been archived by the owner on Jul 27, 2018. It is now read-only.

Changed function parameter types to match the ones in NSNotificationCenter #2

Closed
wants to merge 1 commit into from

Conversation

nmarkovic04
Copy link

Changed function parameter types to match the ones in NSNotificationCenter so passing the sender is optional in case when you want to attach userInfo to the notification object.

e.g. Kugel.publish("sessionChanged", object: nil, userInfo: ["key" : "val"])

@ldiqual
Copy link
Contributor

ldiqual commented Jan 13, 2016

@nmarkovic04 Thanks for your PR! At this point I think we should just go with default params so all cases are handled in one entry point. For instance:

public class func publish(name: String, object: AnyObject? = nil, userInfo: [NSObject: AnyObject]? = nil)

Working on this now, I'll update the code and reference this PR when I'm done.

@ldiqual ldiqual closed this in 988fb5d Jan 13, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants