@@ -14,7 +14,8 @@ import Foundation
1414 import RxSwift
1515 import RxCocoa
1616#endif
17- /// For more information take a look at `DelegateProxyType`.
17+
18+ /// For more information take a look at `DelegateProxyType`.
1819public class RxASCollectionDelegateProxy : DelegateProxy , DelegateProxyType , ASCollectionDelegate , ASCollectionDelegateFlowLayout {
1920
2021 /// Typed parent object.
@@ -40,7 +41,7 @@ public class RxASCollectionDelegateProxy: DelegateProxy, DelegateProxyType, ASCo
4041 }
4142}
4243
43- extension Reactive where Base: ASCollectionNode {
44+ public extension Reactive where Base: ASCollectionNode {
4445
4546 var delegate : DelegateProxy {
4647 return RxASCollectionDelegateProxy . proxyForObject ( base)
@@ -58,7 +59,7 @@ extension Reactive where Base: ASCollectionNode {
5859 }
5960
6061 /// Reactive wrapper for `delegate` message `collectionNode(_:didSelectItemAtIndexPath:)`.
61- public var itemSelected : ControlEvent < IndexPath > {
62+ var itemSelected : ControlEvent < IndexPath > {
6263 let source = delegate. methodInvoked ( #selector( ASCollectionDelegate . collectionNode ( _: didSelectItemAt: ) ) )
6364 . map { a in
6465 return a [ 1 ] as! IndexPath
@@ -68,7 +69,7 @@ extension Reactive where Base: ASCollectionNode {
6869 }
6970
7071 /// Reactive wrapper for `delegate` message `collectionNode(_:didSelectItemAtIndexPath:)`.
71- public var itemDeselected : ControlEvent < IndexPath > {
72+ var itemDeselected : ControlEvent < IndexPath > {
7273 let source = delegate. methodInvoked ( #selector( ASCollectionDelegate . collectionNode ( _: didDeselectItemAt: ) ) )
7374 . map { a in
7475 return a [ 1 ] as! IndexPath
@@ -78,7 +79,7 @@ extension Reactive where Base: ASCollectionNode {
7879 }
7980
8081 /// Reactive wrapper for `delegate` message `collectionNode(_:didHighlightItemAt:)`.
81- public var itemHighlighted : ControlEvent < IndexPath > {
82+ var itemHighlighted : ControlEvent < IndexPath > {
8283 let source = delegate. methodInvoked ( #selector( ASCollectionDelegate . collectionNode ( _: didHighlightItemAt: ) ) )
8384 . map { a in
8485 return try castOrThrow ( IndexPath . self, a [ 1 ] )
@@ -88,7 +89,7 @@ extension Reactive where Base: ASCollectionNode {
8889 }
8990
9091 /// Reactive wrapper for `delegate` message `collectionNode(_:didUnhighlightItemAt:)`.
91- public var itemUnhighlighted : ControlEvent < IndexPath > {
92+ var itemUnhighlighted : ControlEvent < IndexPath > {
9293 let source = delegate. methodInvoked ( #selector( ASCollectionDelegate . collectionNode ( _: didUnhighlightItemAt: ) ) )
9394 . map { a in
9495 return try castOrThrow ( IndexPath . self, a [ 1 ] )
@@ -98,7 +99,7 @@ extension Reactive where Base: ASCollectionNode {
9899 }
99100
100101 /// Reactive wrapper for `delegate` message `collectionNode:willDisplay:forItemAt:`.
101- public var willDisplayItem : ControlEvent < ASCellNode > {
102+ var willDisplayItem : ControlEvent < ASCellNode > {
102103 let source : Observable < ASCellNode > = self . delegate. methodInvoked ( #selector( ASCollectionDelegate . collectionNode ( _: willDisplayItemWith: ) ) )
103104 . map { a in
104105 return try castOrThrow ( ASCellNode . self, a [ 1 ] )
@@ -108,7 +109,7 @@ extension Reactive where Base: ASCollectionNode {
108109 }
109110
110111 /// Reactive wrapper for `delegate` message `collectionNode(_:willDisplaySupplementaryView:forElementKind:at:)`.
111- public var willDisplaySupplementaryElement : ControlEvent < ASCellNode > {
112+ var willDisplaySupplementaryElement : ControlEvent < ASCellNode > {
112113 let source : Observable < ASCellNode > = self . delegate. methodInvoked ( #selector( ASCollectionDelegate . collectionNode ( _: willDisplaySupplementaryElementWith: ) ) )
113114 . map { a in
114115 return try castOrThrow ( ASCellNode . self, a [ 1 ] )
@@ -118,7 +119,7 @@ extension Reactive where Base: ASCollectionNode {
118119 }
119120
120121 /// Reactive wrapper for `delegate` message `collectionNode:didEndDisplaying:forItemAt:`.
121- public var didEndDisplayingItem : ControlEvent < ASCellNode > {
122+ var didEndDisplayingItem : ControlEvent < ASCellNode > {
122123 let source : Observable < ASCellNode > = self . delegate. methodInvoked ( #selector( ASCollectionDelegate . collectionNode ( _: didEndDisplayingItemWith: ) ) )
123124 . map { a in
124125 return try castOrThrow ( ASCellNode . self, a [ 1 ] )
@@ -128,7 +129,7 @@ extension Reactive where Base: ASCollectionNode {
128129 }
129130
130131 /// Reactive wrapper for `delegate` message `collectionNode(_:didEndDisplayingSupplementaryView:forElementOfKind:at:)`.
131- public var didEndDisplayingSupplementaryElement : ControlEvent < ASCellNode > {
132+ var didEndDisplayingSupplementaryElement : ControlEvent < ASCellNode > {
132133 let source : Observable < ASCellNode > = self . delegate. methodInvoked ( #selector( ASCollectionDelegate . collectionNode ( _: didEndDisplayingSupplementaryElementWith: ) ) )
133134 . map { a in
134135 return try castOrThrow ( ASCellNode . self, a [ 1 ] )
@@ -146,7 +147,7 @@ extension Reactive where Base: ASCollectionNode {
146147 /// collectionNode.rx.modelSelected(MyModel.self)
147148 /// .map { ...
148149 /// ```
149- public func modelSelected< T> ( _ modelType: T . Type ) -> ControlEvent < T > {
150+ func modelSelected< T> ( _ modelType: T . Type ) -> ControlEvent < T > {
150151 let source : Observable < T > = itemSelected. flatMap { [ weak view = self . base as ASCollectionNode ] indexPath -> Observable < T > in
151152 guard let view = view else {
152153 return Observable . empty ( )
@@ -167,7 +168,7 @@ extension Reactive where Base: ASCollectionNode {
167168 /// collectionNode.rx.modelDeselected(MyModel.self)
168169 /// .map { ...
169170 /// ```
170- public func modelDeselected< T> ( _ modelType: T . Type ) -> ControlEvent < T > {
171+ func modelDeselected< T> ( _ modelType: T . Type ) -> ControlEvent < T > {
171172 let source : Observable < T > = itemDeselected. flatMap { [ weak view = self . base as ASCollectionNode ] indexPath -> Observable < T > in
172173 guard let view = view else {
173174 return Observable . empty ( )
@@ -180,7 +181,7 @@ extension Reactive where Base: ASCollectionNode {
180181 }
181182
182183 /// Synchronous helper method for retrieving a model at indexPath through a reactive data source
183- public func model< T> ( at indexPath: IndexPath ) throws -> T {
184+ func model< T> ( at indexPath: IndexPath ) throws -> T {
184185 let dataSource : SectionedViewDataSourceType = castOrFatalError ( self . dataSource. forwardToDelegate ( ) , message: " This method only works in case one of the `rx.itemsWith*` methods was used. " )
185186
186187 let element = try dataSource. model ( at: indexPath)
0 commit comments