MEOKit
是我自己的 Swift 库
- 用 extension 添加了常用功能
- 从我的自作框架 MEKitObjC 移植而来(正在进行中)
扩展
请参阅 wiki
Toast
- 类似 Android 的 Toast 显示
Toast.show(text: "メッセージ")
Cached
- 执行数据(Data, String, UIImage)的数据缓存
let key: String = "hogehoge"
Cached.add(string: "キャッシュデータ", key: key)
if let str = Cached.string(key: key){
print("str \(str)")
}
- 默认保存期限为1周
- 缓存数据将保存在应用程序的 cache 文件夹中
- 数据删除使用 cache 文件夹的自动删除或手动删除
- 数据自动删除尚未实现
安装
Carthage
github "mitsuharu/MEOKit"
CocoaPods
pod "MEOKit"
许可
MIT 许可