Skip to content

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

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages