forked from RxSwiftCommunity/RxDataSources
-
Notifications
You must be signed in to change notification settings - Fork 0
/
RxDataSources.podspec
44 lines (35 loc) · 1.48 KB
/
RxDataSources.podspec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Pod::Spec.new do |s|
s.name = "RxDataSources"
s.version = "1.0.3"
s.summary = "This is a collection of reactive data sources for UITableView and UICollectionView."
s.description = <<-DESC
This is a collection of reactive data sources for UITableView and UICollectionView.
It enables creation of animated data sources for table an collection views in just a couple of lines of code.
```swift
let data: Observable<Section> = ...
let dataSource = RxTableViewSectionedAnimatedDataSource<Section>()
dataSource.cellFactory = { (tv, ip, i) in
let cell = tv.dequeueReusableCell(withIdentifier: "Cell") ?? UITableViewCell(style:.Default, reuseIdentifier: "Cell")
cell.textLabel!.text = "\(i)"
return cell
}
// animated
data
.bindTo(animatedTableView.rx.items(dataSource: dataSource))
.addDisposableTo(disposeBag)
// normal reload
data
.bindTo(tableView.rx.items(dataSource: dataSource)).disposed(by: disposeBag)
```
DESC
s.homepage = "https://github.com/ReactiveX/RxSwift"
s.license = 'MIT'
s.author = { "Krunoslav Zaher" => "[email protected]" }
s.source = { :git => "https://github.com/RxSwiftCommunity/RxDataSources.git", :tag => s.version.to_s }
s.requires_arc = true
s.ios.deployment_target = '8.0'
s.tvos.deployment_target = '9.0'
s.source_files = 'Sources/**/*.swift'
s.dependency 'RxSwift', '~> 3.0'
s.dependency 'RxCocoa', '~> 3.0'
end