https://github.com/meniny/eventer
Event bus for iOS
https://github.com/meniny/eventer
eventbus events
Last synced: 2 months ago
JSON representation
Event bus for iOS
- Host: GitHub
- URL: https://github.com/meniny/eventer
- Owner: Meniny
- License: mit
- Created: 2018-02-28T03:14:56.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-04-16T04:12:46.000Z (about 7 years ago)
- Last Synced: 2025-02-27T02:43:02.681Z (over 1 year ago)
- Topics: eventbus, events
- Language: Swift
- Homepage: https://meniny.cn/Eventer/
- Size: 15.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
## 🏵 Introduction
**Eventer** is a tiny event post/subscribe library for iOS.
## 📋 Requirements
- iOS 8.0+
- Xcode 9.0+ with Swift 5.0+
## 📲 Installation
`Eventer` is available on [CocoaPods](https://cocoapods.org):
```ruby
use_frameworks!
pod 'Eventer'
```
## ❤️ Contribution
You are welcome to fork and submit pull requests.
## 🔖 License
`Eventer` is open-sourced software, licensed under the `MIT` license.
## 💫 Usage
```swift
Eventer.on(self, name: "EventName") { (notification) in
// ...
}
Eventer.onMainThread(self, name: "AnotherEventName") { (_) in
// ...
}
```
```swift
Eventer.post(EventName.didAppear.rawValue, on: .main)
```
```swift
Eventer.unregister(self)
```