https://github.com/meniny/beam
🚃 EventBus implementation written in Swift.
https://github.com/meniny/beam
event eventbus
Last synced: 10 months ago
JSON representation
🚃 EventBus implementation written in Swift.
- Host: GitHub
- URL: https://github.com/meniny/beam
- Owner: Meniny
- License: mit
- Created: 2018-06-03T13:49:55.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-03T15:18:08.000Z (about 8 years ago)
- Last Synced: 2024-11-18T03:25:39.328Z (over 1 year ago)
- Topics: event, eventbus
- Language: Swift
- Homepage:
- Size: 1.64 MB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE.md
Awesome Lists containing this project
README
:name: Beam
:author: Elias Abel
:author_esc: Elias%20Abel
:mail: admin@meniny.cn
:desc: an EventBus implementation written in Swift.
:icon: {name}.png
:version: 1.0.0
:na: N/A
:ios: 9.0
:macos: 10.10
:watchos: 2.0
:tvos: 9.0
:linux: {na}
:xcode: 9.3
:swift: 4.1
:license: MIT
:sep: %20%7C%20
:platform: iOS{sep}macOS{sep}watchOS{sep}tvOS
// :toc: left
:toclevels: 6
:toc-title: TOC
:source-highlighter: highlightjs
// :source-highlighter: pygments
= Meet `{name}`
{author} <{mail}>
v{version}, 2018-06-03
[subs="attributes"]
++++
++++
:toc:
== 🏵 Introduction
**{name}** is {desc}.
== 📋 Requirements
[%header]
|===
2+^m|Type 1+^m|Requirement
1.5+^.^|Platform ^|iOS ^|{ios}+
^|macOS ^|{macos}
^|tvOS ^|{tvos}
^|watchOS ^|{watchos}
^|Linux ^|{linux}
^|IDE ^|Xcode ^| {xcode}+
^|Language ^|Swift ^| {swift}+
|===
== 📲 Installation
=== CocoaPods
`{name}` is available on link:https://cocoapods.org[CocoaPods].
[source, ruby, subs="verbatim,attributes"]
----
use_frameworks!
pod '{name}'
----
=== Manually
Copy all files in the `{name}` directory into your project.
== 🛌 Dependency
{na}
== ❤️ Contribution
You are welcome to fork and submit pull requests.
== 🔖 License
`{name}` is open-sourced software, licensed under the link:./LICENSE.md[`{license}`] license.
== 🔫 Usage
[source, swift, subs="verbatim,attributes"]
----
import {name}
enum TestEvent: String, Event {
case callback
}
----
[source, swift, subs="verbatim,attributes"]
----
import {name}
class SomeClass {
init() {
Beam.register(self) { (event) in
// ...
}
}
deinit {
Beam.unregister(self)
}
}
----
[source, swift, subs="verbatim,attributes"]
----
import {name}
Beam.post(TestEvent.callback)
----