diff --git a/Cartfile b/Cartfile index 044c51d..24ce080 100644 --- a/Cartfile +++ b/Cartfile @@ -1 +1 @@ -github "ReactiveX/RxSwift" ~> 4.4 \ No newline at end of file +github "ReactiveX/RxSwift" ~> 5.0 \ No newline at end of file diff --git a/Podfile b/Podfile index 0ca0287..3a5d510 100644 --- a/Podfile +++ b/Podfile @@ -8,8 +8,7 @@ end post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| - config.build_settings['SWIFT_VERSION'] = '4.2' - #config.build_settings['MACOSX_DEPLOYMENT_TARGET'] = '10.10' + config.build_settings['SWIFT_VERSION'] = '5.0' end end end diff --git a/Podfile.lock b/Podfile.lock index 9910d8e..132baf7 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -4,13 +4,16 @@ PODS: - GoogleMaps/Base (3.1.0) - GoogleMaps/Maps (3.1.0): - GoogleMaps/Base - - RxCocoa (4.5.0): - - RxSwift (>= 4.4.2, ~> 4.4) - - RxGoogleMaps (3.2.0): + - RxCocoa (5.0.0): + - RxRelay (~> 5) + - RxSwift (~> 5) + - RxGoogleMaps (4.0.0): - GoogleMaps (~> 3) - - RxCocoa (~> 4) - - RxSwift (~> 4) - - RxSwift (4.5.0) + - RxCocoa (~> 5) + - RxSwift (~> 5) + - RxRelay (5.0.0): + - RxSwift (~> 5) + - RxSwift (5.0.0) DEPENDENCIES: - RxGoogleMaps (from `./`) @@ -19,6 +22,7 @@ SPEC REPOS: https://github.com/cocoapods/specs.git: - GoogleMaps - RxCocoa + - RxRelay - RxSwift EXTERNAL SOURCES: @@ -27,10 +31,11 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: GoogleMaps: 5c13302e6fe6bb6e686b267196586b91cd594225 - RxCocoa: cbf70265dc65a981d4ac982e513c10cf23df24a0 - RxGoogleMaps: d097750dd5b512e3c9e860305ee289709779c8fe - RxSwift: f172070dfd1a93d70a9ab97a5a01166206e1c575 + RxCocoa: fcf32050ac00d801f34a7f71d5e8e7f23026dcd8 + RxGoogleMaps: 5d8a91a26dc9e3f703c5be09424e3ecf7f607328 + RxRelay: 4f7409406a51a55cd88483f21ed898c234d60f18 + RxSwift: 8b0671caa829a763bbce7271095859121cbd895f -PODFILE CHECKSUM: e792f107d2ba042de4cbc3845ff8c3ef4be9fae3 +PODFILE CHECKSUM: b57e58c55d574ab5693f061b8799cf62f94c9842 COCOAPODS: 1.7.0.beta.3 diff --git a/RxGoogleMaps.podspec b/RxGoogleMaps.podspec index 1cb505c..125099d 100644 --- a/RxGoogleMaps.podspec +++ b/RxGoogleMaps.podspec @@ -1,10 +1,10 @@ Pod::Spec.new do |s| s.name = "RxGoogleMaps" - s.version = "3.2.0" + s.version = "4.0.0" s.summary = "RxSwift reactive wrapper for GoogleMaps SDK." s.homepage = "https://github.com/RxSwiftCommunity/RxGoogleMaps" s.license = 'MIT' - s.author = { "Yongha Yoo" => "inkyfox@oo-v.com", "RxSwift Community" => "community@rxswift.org" } + s.author = { "RxSwift Community" => "community@rxswift.org" } s.platform = :ios, "9.0" s.source = { :git => "https://github.com/RxSwiftCommunity/RxGoogleMaps.git", :tag => s.version.to_s } s.requires_arc = true @@ -12,11 +12,7 @@ Pod::Spec.new do |s| s.source_files = 'Sources/*.swift' s.static_framework = true - s.dependency 'RxSwift', '~> 4' - s.dependency 'RxCocoa', '~> 4' + s.dependency 'RxSwift', '~> 5' + s.dependency 'RxCocoa', '~> 5' s.dependency 'GoogleMaps', '~> 3' - - s.pod_target_xcconfig = { - 'SWIFT_VERSION' => '4.2' - } end diff --git a/RxGoogleMaps.xcodeproj/project.pbxproj b/RxGoogleMaps.xcodeproj/project.pbxproj index 53449be..9d1945a 100644 --- a/RxGoogleMaps.xcodeproj/project.pbxproj +++ b/RxGoogleMaps.xcodeproj/project.pbxproj @@ -182,7 +182,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0800; - LastUpgradeCheck = 1000; + LastUpgradeCheck = 1020; ORGANIZATIONNAME = "Gen X Hippies Company"; TargetAttributes = { 090646D11EB8C350007F53BA = { @@ -199,7 +199,7 @@ }; buildConfigurationList = A90F9C951DAAB67100A3461E /* Build configuration list for PBXProject "RxGoogleMaps" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, @@ -363,6 +363,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -415,6 +416,7 @@ SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -425,6 +427,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -469,6 +472,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -487,7 +491,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.oo-v.RxGoogleMaps.Example"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -502,7 +506,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.oo-v.RxGoogleMaps.Example"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Release; }; diff --git a/RxGoogleMaps.xcodeproj/xcshareddata/xcschemes/RxGoogleMaps-iOS.xcscheme b/RxGoogleMaps.xcodeproj/xcshareddata/xcschemes/RxGoogleMaps-iOS.xcscheme index 0bcfab7..8ca6e58 100644 --- a/RxGoogleMaps.xcodeproj/xcshareddata/xcschemes/RxGoogleMaps-iOS.xcscheme +++ b/RxGoogleMaps.xcodeproj/xcshareddata/xcschemes/RxGoogleMaps-iOS.xcscheme @@ -1,6 +1,6 @@ @@ -37,7 +36,6 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/RxGoogleMaps.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/RxGoogleMaps.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/RxGoogleMaps.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Sources/GMSCircle+Rx.swift b/Sources/GMSCircle+Rx.swift index 0c7b254..55cb831 100644 --- a/Sources/GMSCircle+Rx.swift +++ b/Sources/GMSCircle+Rx.swift @@ -14,35 +14,33 @@ import RxCocoa import GoogleMaps public extension Reactive where Base: GMSCircle { - - public var position: AnyObserver { + var position: Binder { return Binder(base) { control, position in control.position = position - }.asObserver() + } } - public var radius: AnyObserver { + var radius: Binder { return Binder(base) { control, radius in control.radius = radius - }.asObserver() + } } - public var strokeWidth: AnyObserver { + var strokeWidth: Binder { return Binder(base) { control, strokeWidth in control.strokeWidth = strokeWidth - }.asObserver() + } } - public var strokeColor: AnyObserver { + var strokeColor: Binder { return Binder(base) { control, strokeColor in control.strokeColor = strokeColor - }.asObserver() + } } - public var fillColor: AnyObserver { + var fillColor: Binder { return Binder(base) { control, fillColor in control.fillColor = fillColor - }.asObserver() + } } - } diff --git a/Sources/GMSGroundOverlay+Rx.swift b/Sources/GMSGroundOverlay+Rx.swift index 7d256fc..5fdbe90 100644 --- a/Sources/GMSGroundOverlay+Rx.swift +++ b/Sources/GMSGroundOverlay+Rx.swift @@ -14,35 +14,33 @@ import RxCocoa import GoogleMaps public extension Reactive where Base: GMSGroundOverlay { - - public var position: AnyObserver { + var position: Binder { return Binder(base) { control, position in control.position = position - }.asObserver() + } } - public var anchor: AnyObserver { + var anchor: Binder { return Binder(base) { control, anchor in control.anchor = anchor - }.asObserver() + } } - public var icon: AnyObserver { + var icon: Binder { return Binder(base) { control, icon in control.icon = icon - }.asObserver() + } } - public var opacity: AnyObserver { + var opacity: Binder { return Binder(base) { control, opacity in control.opacity = opacity - }.asObserver() + } } - public var bearing: AnyObserver { + var bearing: Binder { return Binder(base) { control, bearing in control.bearing = bearing - }.asObserver() + } } - } diff --git a/Sources/GMSMapView+Rx.swift b/Sources/GMSMapView+Rx.swift index 8e5d1fd..b6ad8b9 100644 --- a/Sources/GMSMapView+Rx.swift +++ b/Sources/GMSMapView+Rx.swift @@ -14,136 +14,134 @@ import RxCocoa import GoogleMaps public extension Reactive where Base: GMSMapView { - - public var camera: AnyObserver { + var camera: Binder { return Binder(base) { control, camera in control.camera = camera - }.asObserver() + } } - public var cameraToAnimate: AnyObserver { + var cameraToAnimate: Binder { return Binder(base) { control, camera in control.animate(to: camera) - }.asObserver() + } } - public var locationToAnimate: AnyObserver { + var locationToAnimate: Binder { return Binder(base) { control, location in control.animate(toLocation: location) - }.asObserver() + } } - public var zoomToAnimate: AnyObserver { + var zoomToAnimate: Binder { return Binder(base) { control, zoom in control.animate(toZoom: zoom) - }.asObserver() + } } - public var bearingToAnimate: AnyObserver { + var bearingToAnimate: Binder { return Binder(base) { control, bearing in control.animate(toBearing: bearing) - }.asObserver() + } } - public var viewingAngleToAnimate: AnyObserver { + var viewingAngleToAnimate: Binder { return Binder(base) { control, viewingAngle in control.animate(toViewingAngle: viewingAngle) - }.asObserver() + } } - public var myLocationEnabled: AnyObserver { + var myLocationEnabled: Binder { return Binder(base) { control, myLocationEnabled in control.isMyLocationEnabled = myLocationEnabled - }.asObserver() + } } - public var myLocation: Observable { + var myLocation: Observable { return observeWeakly(CLLocation.self, "myLocation") } - public var selectedMarker: ControlProperty { + var selectedMarker: ControlProperty { return ControlProperty(values: observeWeakly(GMSMarker.self, "selectedMarker"), valueSink: Binder(base) { control, selectedMarker in control.selectedMarker = selectedMarker - }.asObserver() + } ) } - public var trafficEnabled: AnyObserver { + var trafficEnabled: Binder { return Binder(base) { control, trafficEnabled in control.isTrafficEnabled = trafficEnabled - }.asObserver() + } } - public var padding: AnyObserver { + var padding: Binder { return Binder(base) { control, padding in control.padding = padding - }.asObserver() + } } - public var scrollGesturesEnabled: AnyObserver { + var scrollGesturesEnabled: Binder { return Binder(base) { control, scrollGestures in control.settings.scrollGestures = scrollGestures - }.asObserver() + } } - public var zoomGesturesEnabled: AnyObserver { + var zoomGesturesEnabled: Binder { return Binder(base) { control, zoomGestures in control.settings.zoomGestures = zoomGestures - }.asObserver() + } } - public var tiltGesturesEnabled: AnyObserver { + var tiltGesturesEnabled: Binder { return Binder(base) { control, tiltGestures in control.settings.tiltGestures = tiltGestures - }.asObserver() + } } - public var rotateGesturesEnabled: AnyObserver { + var rotateGesturesEnabled: Binder { return Binder(base) { control, rotateGestures in control.settings.rotateGestures = rotateGestures - }.asObserver() + } } - public var compassButtonVisible: AnyObserver { + var compassButtonVisible: Binder { return Binder(base) { control, compassButton in control.settings.compassButton = compassButton - }.asObserver() + } } - public var myLocationButtonVisible: AnyObserver { + var myLocationButtonVisible: Binder { return Binder(base) { control, myLocationButton in control.settings.myLocationButton = myLocationButton - }.asObserver() + } } } -extension Reactive where Base : GMSMapView { - +public extension Reactive where Base: GMSMapView { fileprivate var delegate: GMSMapViewDelegateProxy { return GMSMapViewDelegateProxy.proxy(for: base) } - public func handleTapMarkerWrapper(_ closure: GMSHandleTapMarker?) { + func handleTapMarkerWrapper(_ closure: GMSHandleTapMarker?) { delegate.handleTapMarker = closure } - public func handleTapOverlayWrapper(_ closure: @escaping GMSHandleTapOverlay) { + func handleTapOverlayWrapper(_ closure: @escaping GMSHandleTapOverlay) { delegate.handleTapOverlay = closure } - public func handleMarkerInfoWindowWrapper(_ closure: GMSHandleMarkerInfo?) { + func handleMarkerInfoWindowWrapper(_ closure: GMSHandleMarkerInfo?) { delegate.handleMarkerInfoWindow = closure } - public func handleMarkerInfoContentsWrapper(_ closure: GMSHandleMarkerInfo?) { + func handleMarkerInfoContentsWrapper(_ closure: GMSHandleMarkerInfo?) { delegate.handleMarkerInfoContents = closure } - public func handleTapMyLocationButton(_ closure: GMSHandleTapMyLocationButton?) { + func handleTapMyLocationButton(_ closure: GMSHandleTapMyLocationButton?) { delegate.handleTapMyLocationButton = closure } - public var willMove: ControlEvent { + var willMove: ControlEvent { let source = delegate .methodInvoked(#selector(GMSMapViewDelegate.mapView(_:willMove:))) .map { a in @@ -152,7 +150,7 @@ extension Reactive where Base : GMSMapView { return ControlEvent(events: source) } - public var didChange: ControlEvent { + var didChange: ControlEvent { let source = delegate .methodInvoked(#selector(GMSMapViewDelegate.mapView(_:didChange:))) .map { a in @@ -161,7 +159,7 @@ extension Reactive where Base : GMSMapView { return ControlEvent(events: source) } - public var idleAt: ControlEvent { + var idleAt: ControlEvent { let source = delegate .methodInvoked(#selector(GMSMapViewDelegate.mapView(_:idleAt:))) .map { a in @@ -170,7 +168,7 @@ extension Reactive where Base : GMSMapView { return ControlEvent(events: source) } - public var didTapAt: ControlEvent { + var didTapAt: ControlEvent { let source = delegate .methodInvoked(#selector(GMSMapViewDelegate.mapView(_:didTapAt:))) .map { a in @@ -179,7 +177,7 @@ extension Reactive where Base : GMSMapView { return ControlEvent(events: source) } - public var didLongPressAt: ControlEvent { + var didLongPressAt: ControlEvent { let source = delegate .methodInvoked(#selector(GMSMapViewDelegate.mapView(_:didLongPressAt:))) .map { a in @@ -188,7 +186,7 @@ extension Reactive where Base : GMSMapView { return ControlEvent(events: source) } - public var didTap: ControlEvent { + var didTap: ControlEvent { let source = delegate .methodInvoked(#selector(GMSMapViewDelegate.mapView(_:didTap:))) .map { a in @@ -197,7 +195,7 @@ extension Reactive where Base : GMSMapView { return ControlEvent(events: source) } - public var didTapInfoWindowOf: ControlEvent { + var didTapInfoWindowOf: ControlEvent { let source = delegate .methodInvoked(#selector(GMSMapViewDelegate.mapView(_:didTapInfoWindowOf:))) .map { a in @@ -206,7 +204,7 @@ extension Reactive where Base : GMSMapView { return ControlEvent(events: source) } - public var didLongPressInfoWindowOf: ControlEvent { + var didLongPressInfoWindowOf: ControlEvent { let source = delegate .methodInvoked(#selector(GMSMapViewDelegate.mapView(_:didLongPressInfoWindowOf:))) .map { a in @@ -215,7 +213,7 @@ extension Reactive where Base : GMSMapView { return ControlEvent(events: source) } - public var didTapAtPoi : ControlEvent<(placeId: String, name: String, location: CLLocationCoordinate2D)> { + var didTapAtPoi : ControlEvent<(placeId: String, name: String, location: CLLocationCoordinate2D)> { let source = delegate .methodInvoked(#selector(GMSMapViewDelegate.mapView(_:didTapPOIWithPlaceID:name:location:))) .map { a -> (placeId: String, name: String, location: CLLocationCoordinate2D) in @@ -229,14 +227,14 @@ extension Reactive where Base : GMSMapView { return ControlEvent(events: source) } - public var didCloseInfoWindowOfMarker: ControlEvent { + var didCloseInfoWindowOfMarker: ControlEvent { let source = delegate .methodInvoked(#selector(GMSMapViewDelegate.mapView(_:didCloseInfoWindowOf:))) .map { a in return try castOrThrow(GMSMarker.self, a[1]) } return ControlEvent(events: source) } - public var didBeginDragging: ControlEvent { + var didBeginDragging: ControlEvent { let source = delegate .methodInvoked(#selector(GMSMapViewDelegate.mapView(_:didBeginDragging:))) .map { a in @@ -245,43 +243,43 @@ extension Reactive where Base : GMSMapView { return ControlEvent(events: source) } - public var didEndDragging: ControlEvent { + var didEndDragging: ControlEvent { let source = delegate .methodInvoked(#selector(GMSMapViewDelegate.mapView(_:didEndDragging:))) .map { a in return try castOrThrow(GMSMarker.self, a[1]) } return ControlEvent(events: source) } - public var didDrag: ControlEvent { + var didDrag: ControlEvent { let source = delegate .methodInvoked(#selector(GMSMapViewDelegate.mapView(_:didDrag:))) .map { a in return try castOrThrow(GMSMarker.self, a[1]) } return ControlEvent(events: source) } - public var didTapMyLocationButton: ControlEvent { + var didTapMyLocationButton: ControlEvent { return ControlEvent(events: delegate.didTapMyLocationButtonEvent) } - public var didStartTileRendering: Observable { + var didStartTileRendering: Observable { return delegate .methodInvoked(#selector(GMSMapViewDelegate.mapViewDidStartTileRendering(_:))) .map { _ in return } } - public var didFinishTileRendering: Observable { + var didFinishTileRendering: Observable { return delegate .methodInvoked(#selector(GMSMapViewDelegate.mapViewDidFinishTileRendering(_:))) .map { _ in return } } - public var snapshotReady: Observable { + var snapshotReady: Observable { return delegate .methodInvoked(#selector(GMSMapViewDelegate.mapViewSnapshotReady(_:))) .map { _ in return } } - public func handleTapMarker(_ closure: ((GMSMarker) -> (Bool))?) { + func handleTapMarker(_ closure: ((GMSMarker) -> (Bool))?) { if let c = closure { handleTapMarkerWrapper { c($0) } } else { @@ -289,11 +287,11 @@ extension Reactive where Base : GMSMapView { } } - public func handleTapOverlay(_ closure: @escaping ((GMSOverlay) -> (Void))) { + func handleTapOverlay(_ closure: @escaping ((GMSOverlay) -> (Void))) { handleTapOverlayWrapper { closure($0) } } - public func handleMarkerInfoWindow(_ closure: ((GMSMarker) -> (UIView?))?) { + func handleMarkerInfoWindow(_ closure: ((GMSMarker) -> (UIView?))?) { if let c = closure { handleMarkerInfoWindowWrapper { c($0) } } else { @@ -301,7 +299,7 @@ extension Reactive where Base : GMSMapView { } } - public func handleMarkerInfoContents(_ closure: ((GMSMarker) -> (UIView?))?) { + func handleMarkerInfoContents(_ closure: ((GMSMarker) -> (UIView?))?) { if let c = closure { handleMarkerInfoContentsWrapper { c($0) } } else { diff --git a/Sources/GMSMarker+Rx.swift b/Sources/GMSMarker+Rx.swift index f5fba28..a59b745 100644 --- a/Sources/GMSMarker+Rx.swift +++ b/Sources/GMSMarker+Rx.swift @@ -14,71 +14,69 @@ import RxCocoa import GoogleMaps public extension Reactive where Base: GMSMarker { - - public var position: AnyObserver { + var position: Binder { return Binder(base) { control, position in control.position = position - }.asObserver() + } } - public var snippet: AnyObserver { + var snippet: Binder { return Binder(base) { control, snippet in control.snippet = snippet - }.asObserver() + } } - public var icon: AnyObserver { + var icon: Binder { return Binder(base) { control, icon in control.icon = icon - }.asObserver() + } } - public var iconView: AnyObserver { + var iconView: Binder { return Binder(base) { control, iconView in control.iconView = iconView - }.asObserver() + } } - public var groundAnchor: AnyObserver { + var groundAnchor: Binder { return Binder(base) { control, groundAnchor in control.groundAnchor = groundAnchor - }.asObserver() + } } - public var infoWindowAnchor: AnyObserver { + var infoWindowAnchor: Binder { return Binder(base) { control, infoWindowAnchor in control.infoWindowAnchor = infoWindowAnchor - }.asObserver() + } } - public var draggable: AnyObserver { + var draggable: Binder { return Binder(base) { control, draggable in control.isDraggable = draggable - }.asObserver() + } } - public var flat: AnyObserver { + var flat: Binder { return Binder(base) { control, flat in control.isFlat = flat - }.asObserver() + } } - public var rotation: AnyObserver { + var rotation: Binder { return Binder(base) { control, rotation in control.rotation = rotation - }.asObserver() + } } - public var opacity: AnyObserver { + var opacity: Binder { return Binder(base) { control, opacity in control.opacity = opacity - }.asObserver() + } } - public var userData: AnyObserver { + var userData: Binder { return Binder(base) { control, userData in control.userData = userData - }.asObserver() + } } - } diff --git a/Sources/GMSOverlay+Rx.swift b/Sources/GMSOverlay+Rx.swift index 6c7ca9f..be82840 100644 --- a/Sources/GMSOverlay+Rx.swift +++ b/Sources/GMSOverlay+Rx.swift @@ -14,23 +14,21 @@ import RxCocoa import GoogleMaps public extension Reactive where Base: GMSOverlay { - - public var title: AnyObserver { + var title: Binder { return Binder(base) { control, title in control.title = title - }.asObserver() + } } - public var tappable: AnyObserver { + var tappable: Binder { return Binder(base) { control, tappable in control.isTappable = tappable - }.asObserver() + } } - public var zIndex: AnyObserver { + var zIndex: Binder { return Binder(base) { control, zIndex in control.zIndex = zIndex - }.asObserver() + } } - } diff --git a/Sources/GMSPolygon+Rx.swift b/Sources/GMSPolygon+Rx.swift index a6e9b5e..b254612 100644 --- a/Sources/GMSPolygon+Rx.swift +++ b/Sources/GMSPolygon+Rx.swift @@ -14,23 +14,21 @@ import RxCocoa import GoogleMaps public extension Reactive where Base: GMSPolygon { - - public var strokeWidth: AnyObserver { + var strokeWidth: Binder { return Binder(base) { control, strokeWidth in control.strokeWidth = strokeWidth - }.asObserver() + } } - public var strokeColor: AnyObserver { + var strokeColor: Binder { return Binder(base) { control, strokeColor in control.strokeColor = strokeColor - }.asObserver() + } } - public var fillColor: AnyObserver { + var fillColor: Binder { return Binder(base) { control, fillColor in control.fillColor = fillColor - }.asObserver() + } } - } diff --git a/Sources/GMSPolyline+Rx.swift b/Sources/GMSPolyline+Rx.swift index 395047c..10af3f8 100644 --- a/Sources/GMSPolyline+Rx.swift +++ b/Sources/GMSPolyline+Rx.swift @@ -14,17 +14,15 @@ import RxCocoa import GoogleMaps public extension Reactive where Base: GMSPolyline { - - public var strokeWidth: AnyObserver { + var strokeWidth: Binder { return Binder(base) { control, strokeWidth in control.strokeWidth = strokeWidth - }.asObserver() + } } - public var strokeColor: AnyObserver { + var strokeColor: Binder { return Binder(base) { control, strokeColor in control.strokeColor = strokeColor - }.asObserver() + } } - }