To run the example project, clone the repo, and run pod install
from the Example directory first.
Inside AppDelegate.swift
let Events = EventManager()
Then add the following inside your view controllers ViewDidLoad or any other init function
Events.listenTo(eventName: "synchronizeAccountDataEvent", action: self.synchronizeAccountData)
After you can push to the controller using this:
Events.trigger(eventName: "synchronizeAccountDataEvent")
Inside the listener function then:
/// Photo uploaded
func synchronizeAccountData (information:Any?)
{
if let mongoId = information as? String
{
print("Uploaded account id: " + mongoId)
}
}
EventManager is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "EventManager"
Fortify Communications Inc, andrei@fortify.pro
EventManager is available under the MIT license. See the LICENSE file for more info.