0 votes
63 views
asked in Swift by
Hi All

 How to use NSNotofication in Swift?

1 Answer

0 votes
answered by (8.2k points)

HI

  For register:

      NSNotificationCenter.defaultCenter().addObserver(self, selector:"loadPage", name: "loadPage", object: nil)

func loadPage(){

 

    }

For Calling

 NSNotificationCenter.defaultCenter().postNotificationName("loadPage", object: nil)

Categories

...