Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tarunon committed Sep 13, 2017
1 parent 16f6c3a commit fc26b0d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions RxCocoa/Common/DelegateProxyFactory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ For example, in RxScrollViewDelegateProxy

class RxScrollViewDelegateProxy: DelegateProxy {
static var factory: DelegateProxyFactory {
return DelegateProxyFactory.sharedFactory(for: RxScrollViewDelegateProxy<UIScrollView>.self)
return DelegateProxyFactory.sharedFactory(for: RxScrollViewDelegateProxy.self)
}
...

Expand All @@ -28,11 +28,11 @@ If need to extend them, call `DelegateProxySubclass.register()` in `knownImpleme

class RxScrollViewDelegateProxy: DelegateProxy {
static func knownImplementations() {
RxTableViewDelegateProxy<UITableView>.register()
RxTableViewDelegateProxy.register(for: UITableView)
}

static var factory: DelegateProxyFactory {
return DelegateProxyFactory.sharedFactory(for: RxScrollViewDelegateProxy<UIScrollView>.self)
return DelegateProxyFactory.sharedFactory(for: RxScrollViewDelegateProxy.self)
}
...

Expand All @@ -45,7 +45,6 @@ public class DelegateProxyFactory {
Shared instance of DelegateProxyFactory, if isn't exist shared instance, make DelegateProxyFactory instance for proxy type and extends.
DelegateProxyFactory have a shared instance per Delegate type.
- parameter proxyType: DelegateProxy type. Should use concrete DelegateProxy type, not generic.
- parameter extends: Extend DelegateProxyFactory if needs. See 'DelegateProxyType'.
- returns: DelegateProxyFactory shared instance.
*/
public static func sharedFactory<DelegateProxy: DelegateProxyType>(for proxyType: DelegateProxy.Type) -> DelegateProxyFactory {
Expand All @@ -68,7 +67,8 @@ public class DelegateProxyFactory {

/**
Extend DelegateProxyFactory for specific object class and delegate proxy.
Define object class on closure argument.
- parameter proxyType: The DelegateProxy type that subclass of factorys owner.
- parameter parentObjectType: Parent object type of DelegateProxy.
*/
internal func extend<DelegateProxy: DelegateProxyType>(with proxyType: DelegateProxy.Type, for parentObjectType: DelegateProxy.ParentObject.Type) {
MainScheduler.ensureExecutingOnScheduler()
Expand Down
6 changes: 3 additions & 3 deletions RxCocoa/Common/DelegateProxyType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public protocol DelegateProxyType : AnyObject {
extension DelegateProxyType {

/// Store DelegateProxy subclass to factory.
/// When make 'Rx*DelegateProxy' subclass, call 'Rx*DelegateProxySubclass.register()' 1 time, or use it in DelegateProxyFactory
/// When make 'Rx*DelegateProxy' subclass, call 'Rx*DelegateProxySubclass.register(for:_)' 1 time, or use it in DelegateProxyFactory
/// 'Rx*DelegateProxy' can have one subclass implementation per concrete ParentObject type.
/// Should call it from concrete DelegateProxy type, not generic.
public static func register(for parentObjectType: ParentObject.Type) {
Expand All @@ -181,8 +181,8 @@ extension DelegateProxyType {
///
/// extension Reactive where Base: UISearchBar {
///
/// public var delegate: DelegateProxy<Base, UISearchBarDelegate> {
/// return RxSearchBarDelegateProxy<Base>.proxy(for: base)
/// public var delegate: DelegateProxy<UISearchBar, UISearchBarDelegate> {
/// return RxSearchBarDelegateProxy.proxy(for: base)
/// }
///
/// public var text: ControlProperty<String> {
Expand Down

0 comments on commit fc26b0d

Please sign in to comment.