Skip to content

Commit 56c20b3

Browse files
committed
Updates for Xcode 8 beta 6.
1 parent 1dc1310 commit 56c20b3

File tree

5 files changed

+42
-42
lines changed

5 files changed

+42
-42
lines changed

Cartfile.resolved

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github "ReactiveX/RxSwift" "091b12242abc774dfea565f1cb518d749a34b40a"
1+
github "ReactiveX/RxSwift" "9b1f22e6a02bdc2ff511069ccb80781c06b1ec6e"

Podfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ EXTERNAL SOURCES:
1717

1818
CHECKOUT OPTIONS:
1919
RxCocoa:
20-
:commit: 091b12242abc774dfea565f1cb518d749a34b40a
20+
:commit: 9b1f22e6a02bdc2ff511069ccb80781c06b1ec6e
2121
:git: [email protected]:ReactiveX/RxSwift.git
2222
RxSwift:
23-
:commit: 091b12242abc774dfea565f1cb518d749a34b40a
23+
:commit: 9b1f22e6a02bdc2ff511069ccb80781c06b1ec6e
2424
:git: [email protected]:ReactiveX/RxSwift.git
2525

2626
SPEC CHECKSUMS:
27-
RxCocoa: 89ab00d5753502520227940e3a0e0a0413683c6b
28-
RxSwift: 77f3a0b15324baa7a1c9bfa9f199648a82424e26
27+
RxCocoa: c611f45c19ef2e159fe0ad4279684190b385e061
28+
RxSwift: 799f527c4aa01e235fbccfb22f46d1c381aa4151
2929

3030
PODFILE CHECKSUM: 810d5edbe5528082fd2e6c64ec9959cbc8e24ec4
3131

Sources/DataSources+Rx/UISectionedViewType+RxAnimatedDataSource.swift

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,42 +13,42 @@ import RxSwift
1313
import RxCocoa
1414
#endif
1515

16-
extension UITableView {
17-
@available(*, deprecated:0.7, renamed:"rx_itemsWithDataSource", message:"You can just use normal `rx_itemsWithDataSource` extension.")
18-
public func rx_itemsAnimatedWithDataSource<
16+
extension Reactive where Base: UITableView {
17+
@available(*, deprecated:0.7, renamed:"itemsWithDataSource", message:"You can just use normal `rx_itemsWithDataSource` extension.")
18+
public func itemsAnimatedWithDataSource<
1919
DataSource: RxTableViewDataSourceType & UITableViewDataSource,
2020
S: Sequence,
21-
O: ObservableType
22-
where
23-
DataSource.Element == S,
24-
O.E == S,
25-
S.Iterator.Element: AnimatableSectionModelType
26-
>
21+
O: ObservableType>
2722
(_ dataSource: DataSource)
28-
-> (source: O)
29-
-> Disposable {
23+
-> (_ source: O)
24+
-> Disposable
25+
where
26+
DataSource.Element == S,
27+
O.E == S,
28+
S.Iterator.Element: AnimatableSectionModelType
29+
{
3030
return { source in
31-
return self.rx_itemsWithDataSource(dataSource)(source: source)
31+
return self.items(dataSource: dataSource)(source)
3232
}
3333
}
3434
}
3535

36-
extension UICollectionView {
37-
@available(*, deprecated:0.7, renamed:"rx_itemsWithDataSource", message:"You can just use normal `rx_itemsWithDataSource` extension.")
38-
public func rx_itemsAnimatedWithDataSource<
36+
extension Reactive where Base: UICollectionView {
37+
@available(*, deprecated:0.7, renamed:"itemsWithDataSource", message:"You can just use normal `rx_itemsWithDataSource` extension.")
38+
public func itemsAnimatedWithDataSource<
3939
DataSource: RxCollectionViewDataSourceType & UICollectionViewDataSource,
4040
S: Sequence,
41-
O: ObservableType
42-
where
43-
DataSource.Element == S,
44-
O.E == S,
45-
S.Iterator.Element: AnimatableSectionModelType
46-
>
41+
O: ObservableType>
4742
(_ dataSource: DataSource)
48-
-> (source: O)
49-
-> Disposable {
43+
-> (_ source: O)
44+
-> Disposable
45+
where
46+
DataSource.Element == S,
47+
O.E == S,
48+
S.Iterator.Element: AnimatableSectionModelType
49+
{
5050
return { source in
51-
return self.rx_itemsWithDataSource(dataSource)(source: source)
51+
return self.items(dataSource: dataSource)(source)
5252
}
5353
}
5454
}

Sources/DataSources/CollectionViewSectionedDataSource.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,14 @@ public class CollectionViewSectionedDataSource<S: SectionModelType>
142142
}
143143
}
144144

145-
public var moveItem: ((CollectionViewSectionedDataSource<S>, sourceIndexPath:IndexPath, destinationIndexPath:IndexPath) -> Void)? {
145+
public var moveItem: ((CollectionViewSectionedDataSource<S>, _ sourceIndexPath:IndexPath, _ destinationIndexPath:IndexPath) -> Void)? {
146146
didSet {
147147
#if DEBUG
148148
ensureNotMutatedAfterBinding()
149149
#endif
150150
}
151151
}
152-
public var canMoveItemAtIndexPath: ((CollectionViewSectionedDataSource<S>, indexPath:IndexPath) -> Bool)? {
152+
public var canMoveItemAtIndexPath: ((CollectionViewSectionedDataSource<S>, IndexPath) -> Bool)? {
153153
didSet {
154154
#if DEBUG
155155
ensureNotMutatedAfterBinding()
@@ -196,7 +196,7 @@ public class CollectionViewSectionedDataSource<S: SectionModelType>
196196
}
197197

198198
override func _rx_collectionView(_ collectionView: UICollectionView, canMoveItemAtIndexPath indexPath: IndexPath) -> Bool {
199-
guard let canMoveItem = canMoveItemAtIndexPath?(self, indexPath: indexPath) else {
199+
guard let canMoveItem = canMoveItemAtIndexPath?(self, indexPath) else {
200200
return super._rx_collectionView(collectionView, canMoveItemAtIndexPath: indexPath)
201201
}
202202

Sources/DataSources/TableViewSectionedDataSource.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -165,29 +165,29 @@ public class RxTableViewSectionedDataSource<S: SectionModelType>
165165
}
166166
}
167167

168-
public var titleForHeaderInSection: ((RxTableViewSectionedDataSource<S>, section: Int) -> String?)? {
168+
public var titleForHeaderInSection: ((RxTableViewSectionedDataSource<S>, Int) -> String?)? {
169169
didSet {
170170
#if DEBUG
171171
ensureNotMutatedAfterBinding()
172172
#endif
173173
}
174174
}
175-
public var titleForFooterInSection: ((RxTableViewSectionedDataSource<S>, section: Int) -> String?)? {
175+
public var titleForFooterInSection: ((RxTableViewSectionedDataSource<S>, Int) -> String?)? {
176176
didSet {
177177
#if DEBUG
178178
ensureNotMutatedAfterBinding()
179179
#endif
180180
}
181181
}
182182

183-
public var canEditRowAtIndexPath: ((RxTableViewSectionedDataSource<S>, indexPath: IndexPath) -> Bool)? {
183+
public var canEditRowAtIndexPath: ((RxTableViewSectionedDataSource<S>, IndexPath) -> Bool)? {
184184
didSet {
185185
#if DEBUG
186186
ensureNotMutatedAfterBinding()
187187
#endif
188188
}
189189
}
190-
public var canMoveRowAtIndexPath: ((RxTableViewSectionedDataSource<S>, indexPath: IndexPath) -> Bool)? {
190+
public var canMoveRowAtIndexPath: ((RxTableViewSectionedDataSource<S>, IndexPath) -> Bool)? {
191191
didSet {
192192
#if DEBUG
193193
ensureNotMutatedAfterBinding()
@@ -205,7 +205,7 @@ public class RxTableViewSectionedDataSource<S: SectionModelType>
205205
#endif
206206
}
207207
}
208-
public var sectionForSectionIndexTitle:((RxTableViewSectionedDataSource<S>, title: String, index: Int) -> Int)? {
208+
public var sectionForSectionIndexTitle:((RxTableViewSectionedDataSource<S>, _ title: String, _ index: Int) -> Int)? {
209209
didSet {
210210
#if DEBUG
211211
ensureNotMutatedAfterBinding()
@@ -242,23 +242,23 @@ public class RxTableViewSectionedDataSource<S: SectionModelType>
242242
}
243243

244244
override func _rx_tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
245-
return titleForHeaderInSection?(self, section: section)
245+
return titleForHeaderInSection?(self, section)
246246
}
247247

248248
override func _rx_tableView(_ tableView: UITableView, titleForFooterInSection section: Int) -> String? {
249-
return titleForFooterInSection?(self, section: section)
249+
return titleForFooterInSection?(self, section)
250250
}
251251

252252
override func _rx_tableView(_ tableView: UITableView, canEditRowAtIndexPath indexPath: IndexPath) -> Bool {
253-
guard let canEditRow = canEditRowAtIndexPath?(self, indexPath: indexPath) else {
253+
guard let canEditRow = canEditRowAtIndexPath?(self, indexPath) else {
254254
return super._rx_tableView(tableView, canEditRowAtIndexPath: indexPath)
255255
}
256256

257257
return canEditRow
258258
}
259259

260260
override func _rx_tableView(_ tableView: UITableView, canMoveRowAtIndexPath indexPath: IndexPath) -> Bool {
261-
guard let canMoveRow = canMoveRowAtIndexPath?(self, indexPath: indexPath) else {
261+
guard let canMoveRow = canMoveRowAtIndexPath?(self, indexPath) else {
262262
return super._rx_tableView(tableView, canMoveRowAtIndexPath: indexPath)
263263
}
264264

@@ -279,7 +279,7 @@ public class RxTableViewSectionedDataSource<S: SectionModelType>
279279
}
280280

281281
override func _rx_tableView(_ tableView: UITableView, sectionForSectionIndexTitle title: String, atIndex index: Int) -> Int {
282-
guard let section = sectionForSectionIndexTitle?(self, title: title, index: index) else {
282+
guard let section = sectionForSectionIndexTitle?(self, title, index) else {
283283
return super._rx_tableView(tableView, sectionForSectionIndexTitle: title, atIndex: index)
284284
}
285285

0 commit comments

Comments
 (0)