GEApplication
关于
该库由 Harald Bregu 维护。
我专注于为 iOS App 设计和编写自定义 UI,以及开发新的模式。
示例
要运行示例项目,请克隆仓库,然后首先从 Example 目录中运行 pod install
。
安装
GEApplication 通过 CocoaPods 提供使用。要安装它,只需将以下行添加到 Podfile 中
pod 'GEApplication'
// Add Listener
GEApplication.current.addListener(self) { application in
}
// Remove Listener
GEApplication.current.removeListener(self)
// Add event to application and send signal to the listener
let event = GAEvent()
event.name = "User did tap the help button"
GEApplication.current.sendEvent(event)
事件流
要开始使用这个库,首先您需要理解其背后的逻辑。首先,为每个控制器或视图添加监听器,之后您可以向GEApplication发送事件。每次您发送事件时,就会向每个监听器发送一个信号。
需求
- iOS 9.0+
- Xcode 9
作者
Harald Bregu, [email protected]
许可
GEApplication遵循MIT许可。更多信息请查看LICENSE文件。