恒达云平台是 E-sites iOS Suite 的一部分。
一个轻量级的框架,用于安排和取消本地通知。
灵感来源于 Mathijs Kadijk 的 R.swift。
👏
R.swift 和这个项目的区别在于,它只查找图像并且有一个特殊的--watch
参数。
安装
Pods
Podfile
pod 'Radon'
然后
pod install
手动
只需下载 radon 二进制文件并将其放置于您喜欢的任何位置。
生成
只需运行
$ Pods/Radon/bin/radon
以下选项
Usage: Pods/Radon/bin/radon [options]
-f, --folder:
The folder to scan
-o, --output:
The folder to write the Radon.swift files to
-w, --watch:
Automatically watch the 'folder'
-r, --remove_foldernames:
Remove the name of the folder from the filename
使用 --watch
选项时,命令行应用程序会自动扫描文件夹,并在该文件夹中进行更改时生成 Radon 文件。
例如:
$ Pods/Radon/bin/radon --folder ./Resources/ --output ./Classes/Generated/ --watch --remove_foldernames
这将生成两个文件
- Radon.swift
- Radon+images.swift
您可以将这两个文件用于您的项目。
有关更多信息,请参阅 示例项目。
使用
let image = Radon.images.assets.icons.ironMan
let imageView = UIImageView(image: image)
imageView.frame = CGRect(x: 50, y: 50, width: 100, height: 100)
self.view.addSubview(imageView)
为了方便,您还可以使用 R.swift 的缩写表示法。
typealias R = Radon