Kontena:Swift 中的 IOC 容器

时间:2021-07-19 19:49:12
【文件属性】:
文件名称:Kontena:Swift 中的 IOC 容器
文件大小:30KB
文件格式:ZIP
更新时间:2021-07-19 19:49:12
Swift Kontena (コンテナ) Swift 中的 IOC 容器 服务定位器/IOC 容器的简单 Swift 实现,具有有限的 DI 功能。 适用于 Swift 和 Objective C 类。 有关如何使用 Kontena 的非常基本的示例,请查看演示项目。 补充笔记 如果要绑定 Swift 协议,则必须添加@objc注释。 你的绑定对象必须从NSObject继承来让容器自动解析依赖。 使用这个库需要 Swift 1.2。 用法 创建容器 import Kontena let container = Container () // init let sharedContainer = Container. sharedInstance // as singleton 合并两个容器 // all bound objects from container2 // are merged
【文件预览】:
Kontena-master
----Demo()
--------Demo()
--------Demo.xcworkspace()
--------Podfile.lock(259B)
--------Demo.xcodeproj()
--------Podfile(135B)
----Kontena.podspec(768B)
----Source()
--------.gitkeep(0B)
--------Container()
--------Kontena.swift(307B)
----Pod()
--------Podfile.lock(342B)
--------Pod.xcodeproj()
--------Tests()
--------Podfile(188B)
--------Pod.xcworkspace()
----CONTRIBUTING.md(503B)
----.travis.yml(405B)
----LICENSE.md(1KB)
----README.md(4KB)
----.gitignore(309B)

网友评论