Skip to content

Commit f6b949f

Browse files
authored
Merge pull request #59 from RxSwiftCommunity/behaviorreplay-bindto
Use bind(to:) on BehaviorReplay
2 parents 4045bf9 + b9850e3 commit f6b949f

File tree

4 files changed

+14
-16
lines changed

4 files changed

+14
-16
lines changed

Example/Podfile.lock

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ PODS:
99
- ReusableKit/Core
1010
- RxCocoa (>= 3.4)
1111
- RxSwift (>= 3.4)
12-
- RxCocoa (4.0.0-beta.0):
13-
- RxSwift (~> 4.0.0-beta.0)
14-
- RxKeyboard (0.7.0):
15-
- RxCocoa (~> 4.0.0-beta.0)
16-
- RxSwift (~> 4.0.0-beta.0)
17-
- RxSwift (4.0.0-beta.0)
12+
- RxCocoa (4.1.2):
13+
- RxSwift (~> 4.0)
14+
- RxKeyboard (0.8.1):
15+
- RxCocoa (>= 4.0.0)
16+
- RxSwift (>= 4.0.0)
17+
- RxSwift (4.1.2)
1818
- SnapKit (4.0.0)
1919
- SwiftyColor (1.0.0)
2020
- SwiftyImage (1.2.0)
@@ -40,9 +40,9 @@ SPEC CHECKSUMS:
4040
CGFloatLiteral: 2ab558b74124b584dd023a35b7e41795a61d8140
4141
ManualLayout: 68ac8cfa6b5f656f7a9fadec3730208b95986880
4242
ReusableKit: 4e4f45128985987555bde17abbf261c0a604f9f2
43-
RxCocoa: 8d809675f4e89c5c4c5a6900bbd11fe632ad5d86
44-
RxKeyboard: 4167b1f005745a4178c3ac4adfc8177482b87675
45-
RxSwift: e0899fae37065c16db976cc5e3c957e4e388869c
43+
RxCocoa: d88ba0f1f6abf040011a9eb4b539324fc426843a
44+
RxKeyboard: ce24525d4a3dc983664e44540f240c8e7bb4d4b8
45+
RxSwift: e49536837d9901277638493ea537394d4b55f570
4646
SnapKit: a42d492c16e80209130a3379f73596c3454b7694
4747
SwiftyColor: 7fa09db14051bc5d7f539e1c4576665975225992
4848
SwiftyImage: ebaa7c7b6163cd4ad102f3bb05a8fb276d35b4f3

Package.resolved

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ let package = Package(
88
.library(name: "RxKeyboard", targets: ["RxKeyboard"]),
99
],
1010
dependencies: [
11-
.package(url: "https://github.com/ReactiveX/RxSwift.git", .upToNextMajor(from: "4.0.0")),
11+
.package(url: "https://github.com/ReactiveX/RxSwift.git", .upToNextMajor(from: "4.1.0")),
1212
],
1313
targets: [
1414
.target(name: "RxKeyboard", dependencies: ["RxSwift", "RxCocoa"]),

Sources/RxKeyboard/RxKeyboard.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,8 @@ public class RxKeyboard: NSObject, RxKeyboardType {
115115

116116
// merge into single sequence
117117
Observable.of(didPan, willChangeFrame, willHide).merge()
118-
.subscribe(onNext: { [weak frameVariable] frame in
119-
frameVariable?.accept(frame)
120-
})
121-
.disposed(by: self.disposeBag)
118+
.bind(to: frameVariable)
119+
.disposed(by: self.disposeBag)
122120

123121
// gesture recognizer
124122
self.panRecognizer.delegate = self

0 commit comments

Comments
 (0)