| { |
| "name": "Centipede", |
| "version": "2.0.0", |
| "summary": "Swift achieve a pure library closures achieve UIKit assembly delegate and dataSource methods.", |
| "description": "一个 Swift 库,使用闭包实现 UIKit 等组件的 delegate 和 dataSource 方法\n\n解决什么问题\n\n在实现 delegate 的各个方法时:\n\n方法遍布整个 ViewController,散乱。\n具体的实现与成员变量被分开了,阅读时需要分开查看。\n如果 ViewController 中实现多个 UITableViewDataSource 时,方法中需要判断组件来做出反应。如下:(这很丑)\nfunc tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {\n return tableView == leftTableView ? leftDatas.count : rightDatas.count\n}\n这些情况让代码不易阅读和维护。\n\n希望:\n\n代码连续。组件的构造、样式设置和各 delegate 实现方法可写在一个位置。\n独立。有多个 UITableView 时,tableViewA 和tableViewB 的 delegate 方法实现是独立的,互不干扰。", |
| "homepage": "https://github.com/klaus01/Centipede", |
| "license": { |
| "type": "MIT", |
| "file": "LICENSE" |
| }, |
| "authors": { |
| "柯磊": "kelei0017@gmail.com" |
| }, |
| "platforms": { |
| "ios": "8.0" |
| }, |
| "source": { |
| "git": "https://github.com/klaus01/Centipede.git", |
| "tag": "2.0.0" |
| }, |
| "source_files": [ |
| "Centipede/**/*.swift", |
| "Centipede/Centipede.h" |
| ], |
| "public_header_files": "Centipede/Centipede.h", |
| "requires_arc": true, |
| "pod_target_xcconfig": { |
| "SWIFT_VERSION": "3.0" |
| } |
| } |