Skip to content

Implement NotificationCenter design mode from Objective-C/Swift with typescript.

License

Notifications You must be signed in to change notification settings

sudotamm/RYNotificationCenter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RYNotificationCenter

Implement NotificationCenter design mode from Objective-C/Swift with typescript.
Manage multiple event emiters with singleton NotificationCenter to simplify notification push/observe logic.

Install with npm

npm install ry-notification-center@latest

How to use

  //Add observer in page/component/plugin init method
  ionViewDidLoad() {
    RYNotificationCenter.default.addObserver(this, "NotificationKey", (notification) => {
    // callback when received notification
    })
  }

  //Remove observer in page/component/plugin dealloc method
  ionViewWillUnload() {
    RYNotificationCenter.default.removeObserver(this)
  }

About

Implement NotificationCenter design mode from Objective-C/Swift with typescript.

Resources

License

Stars

Watchers

Forks

Packages

No packages published