Beam
Meet
🏵 Introduction
Beam is an EventBus implementation written in Swift..
📋 Requirements
Type | Requirement | |
---|---|---|
Platform |
iOS |
9.0+ |
macOS |
10.10 |
|
tvOS |
9.0 |
|
watchOS |
2.0 |
|
Linux |
N/A |
|
IDE |
Xcode |
9.3+ |
Language |
Swift |
4.1+ |
📲 Installation
Manually
Copy all files in the Beam
directory into your project.
🛌 Dependency
N/A
❤️ Contribution
You are welcome to fork and submit pull requests.
🔖 License
Beam
is open-sourced software, licensed under the MIT
license.
🔫 Usage
import Beam
enum TestEvent: String, Event {
case callback
}
import Beam
class SomeClass {
init() {
Beam<TestEvent>.register(self) { (event) in
// ...
}
}
deinit {
Beam<TestEvent>.unregister(self)
}
}
import Beam
Beam<TestEvent>.post(TestEvent.callback)