Class1:
var string = "hello"
NSNotificationCenter.defaultCenter().postNotificationName("notificationA", object: nil)
Class2:
NSNotificationCenter.defaultCenter().addObserver(self,selector: "handle_notification",name: "notificationA",object: nil)
func handle_notification(){
//I would like to get the string here
}
I have tried to pass the string in the object parameter (in Class1) but I am not sure what I have to do in Class2 to receive it.
Thank you