Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch-1 #242

Open
wants to merge 90 commits into
base: 4.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
edfb0ea
Add `completions` property to `CompletableAction`
mosamer Apr 22, 2019
ae1e4ca
Update changelog
mosamer Apr 22, 2019
cb8a78a
Address review comments
mosamer Apr 23, 2019
5e7fb77
Change `inputs` type to `AnyObserver<Input>` (#193)
mosamer Apr 23, 2019
96f98bf
Upating dependencies to Rx 4.5.0
LucianoPAlmeida Apr 6, 2019
c7f28f4
Reverting version.
LucianoPAlmeida Apr 7, 2019
21a60f8
From 4.0.0 on package
LucianoPAlmeida Apr 7, 2019
e43b945
Apply suggestions from code review
LucianoPAlmeida Apr 10, 2019
58335d0
Updating to Rx 5.0
LucianoPAlmeida May 1, 2019
1509604
Updating to Rx 5.0 and fixing deprecated warnings.
LucianoPAlmeida May 1, 2019
fc76625
Swiftlint autocorrect on test directory.
LucianoPAlmeida May 1, 2019
0847f64
Update all to 5.0
LucianoPAlmeida May 1, 2019
5c6ec0b
Recorded.events()
LucianoPAlmeida May 1, 2019
27997ec
Xcode ctrl + i
LucianoPAlmeida May 1, 2019
d005532
Align with XCT...
LucianoPAlmeida May 1, 2019
956e0e6
Adjustments on identation
LucianoPAlmeida May 1, 2019
f656fec
Action 4.0.0
freak4pc May 2, 2019
b1e1358
Remove RxAtomic references
May 2, 2019
f821c32
Use Swift 5 in project settings
May 2, 2019
cdade63
Update changelog
May 2, 2019
e214481
Specs-Cleanup: Initial introduction of `Nimble+RxTest+Ext` and `TestE…
bobgodwinx May 8, 2019
8730564
Specs-Cleanup: Introduced `func asString() -> String` to get the desc…
bobgodwinx May 8, 2019
7f8254e
Specs-Cleanup: Introduced `var isError: Bool` on `Event` Type
bobgodwinx May 8, 2019
3ffcdca
Specs-Cleanup: `extension PredicateResult` to return an evaluationFai…
bobgodwinx May 8, 2019
251a1db
Specs-Cleanup: Added `public func match<T: Equatable>(_ expected: T) …
bobgodwinx May 8, 2019
a6aeb78
Specs-Cleanup: Added `public func match<T>(_ expected: [Recorded<Even…
bobgodwinx May 8, 2019
b8e2b51
Specs-Cleanup: Added `public func match<T, E: Error>(with expectedErr…
bobgodwinx May 8, 2019
4eaea14
Spec-Cleanup: Cosmetic touches on matcher fucntions
bobgodwinx May 8, 2019
5022210
Specs-Cleanup: Added `enum TestEvents` which summarises events for tests
bobgodwinx May 8, 2019
0a6c898
Specs-Cleanup: Overhaul of `ActionTests` and dropped totally the use …
bobgodwinx May 8, 2019
92e338b
Specs-Cleanup: Cosmetic cleanup of `AlertActionTests`
bobgodwinx May 8, 2019
b33fb9e
Specs-Cleanup: Cosmetic cleanup of `BarButtonTests`
bobgodwinx May 8, 2019
90453e9
Specs-Cleanup: Cleanup `hasStopEvent` in favor of a more elegant `exp…
bobgodwinx May 8, 2019
7f651b3
Fix warning for the dueTime argument
toshinarin May 9, 2019
944ddcc
Fix misplacement of activityIndicatorView
toshinarin May 9, 2019
7ef5b9d
Fix indent
toshinarin May 9, 2019
162a128
Merge pull request #200 from toshinarin/remove-warning-of-demo
ashfurrow May 9, 2019
5f358f3
Removed `RxBlocking ` from imports because it's now redundant
bobgodwinx May 10, 2019
6463c0f
Recreated `ActionTests` file because it was proving difficult to have…
bobgodwinx May 10, 2019
7cb6b42
Merge pull request #201 from bobgodwinx/rxblocking-removal
ashfurrow May 10, 2019
db54199
chore: add missing dependency
sue71 Oct 10, 2019
0ebcb89
Swift version added to podspec
hamd-shah Oct 11, 2019
6c3b71e
Merge pull request #211 from hamdshah/CocoapodsSwiftVersionFix
ashfurrow Oct 11, 2019
4123b27
Add RxCocoa dependency for all non-test targets
vladcorneci Oct 22, 2019
31b532c
Merge pull request #209 from sue71/chore/fix-dependency
ashfurrow Oct 22, 2019
eb10d93
Fixes merge conflict.
ashfurrow Oct 22, 2019
b700460
Merge pull request #212 from asaltvld30/master
ashfurrow Oct 22, 2019
b790334
Update version in Readme.md
shocho0101 Feb 18, 2020
3d5d586
Merge pull request #213 from shocho0101/patch-1
ashfurrow Feb 18, 2020
d1d01df
Update Readme.md (#215)
Mar 18, 2020
1079e55
Version bump. Fixes #218.
ashfurrow May 4, 2020
c1bc214
Updates Xcode to 11.3. Also cleans up yaml formatting.
ashfurrow May 7, 2020
60def54
Moves to iPhone 11.
ashfurrow May 7, 2020
0551696
Upgrades Apple Watch simulator.
ashfurrow May 8, 2020
7a42e05
Merge pull request #220 from RxSwiftCommunity/fix-ci
ashfurrow May 8, 2020
128f57b
Update dependencies
Econa77 Jun 15, 2020
53c42b3
Fix link frameworks
Econa77 Jun 15, 2020
ccce814
Add support for RxSwift 6
sharplet Oct 16, 2020
f26e79a
Use Xcode 11.7 on CI
sharplet Oct 19, 2020
7688e52
Don't override SDK when selecting simulator destination
sharplet Oct 19, 2020
8fd0019
Update to Nimble 9.0
sharplet Oct 19, 2020
be8782f
Merge pull request #223 from sharplet/rxswift-6
ashfurrow Oct 19, 2020
77a1aba
Version bump.
ashfurrow Oct 19, 2020
7c73f99
Change iOS Deployment target version
Econa77 Jan 4, 2021
eeda6f5
Change IPHONEOS_DEPLOYMENT_TARGET
Econa77 Jan 4, 2021
ee90459
Update Changelog.md
Econa77 Jan 4, 2021
83ca376
Merge pull request #226 from Econa77/feature/fix-ios-version
ashfurrow Jan 4, 2021
21110e9
Version bump.
ashfurrow Jan 4, 2021
26f130e
breakRetainCycle: break retain cycle in bind(to:input:) and tests.
nflahavan Jan 24, 2021
7259350
breakRetainCycle: Formatting in Control+Action.swift
nflahavan Jan 24, 2021
53eb0d7
breakRetainCycle: Formatting in BindToTests.swift
nflahavan Jan 24, 2021
2f2e1e2
breakRetainCycle: changelog
nflahavan Jan 24, 2021
97c56a6
Fixing deprecated warnings
TTOzzi Feb 13, 2021
2546b57
Merge pull request #229 from TTOzzi/master
ashfurrow Feb 22, 2021
8a07a4f
Use GitHub Actions
Econa77 Apr 14, 2021
9a15277
Fix matrix
Econa77 Apr 14, 2021
e4f5e85
Update Carthage.resolved
Econa77 Apr 14, 2021
e587f4e
Fix macOS test build
Econa77 Apr 14, 2021
2f435d5
Run test Action-macOS
Econa77 Apr 14, 2021
d2a8c36
Remove circle.yml
Econa77 Apr 14, 2021
fa48f82
Merge pull request #232 from Econa77/feature/migrate-github-actions
ashfurrow Apr 14, 2021
75b4ca1
Use relay
funzin May 1, 2021
c880fac
Update changelog
funzin May 1, 2021
7f03d52
Merge pull request #234 from funzin/refactor
ashfurrow May 4, 2021
ca75632
Filter out errors from `CompletableAction.completions` (#236)
sdanny Aug 5, 2021
55f5da0
Version bump.
Aug 5, 2021
dd6c8b4
Updates copyright year.
ashfurrow Oct 27, 2021
bb70698
Tightens up some documentation.
ashfurrow Oct 27, 2021
90259f7
Merge pull request #238 from RxSwiftCommunity/freshen-up-docs
ashfurrow Oct 28, 2021
d896821
Update Changelog.md
Donnadonnam Feb 25, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: CI
on: [push, pull_request]
jobs:
xcode:
runs-on: macos-10.15
strategy:
matrix:
swift: [5.0, 4.2]
fail-fast: false
name: Action Tests (Swift ${{ matrix.swift }})
env:
DEVELOPER_DIR: /Applications/Xcode_11.7.app/Contents/Developer
steps:
- uses: actions/checkout@v2
- name: Cache Carthage
uses: actions/cache@v2
with:
path: Carthage
key: ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }}
restore-keys: |
${{ runner.os }}-carthage-
- name: Bootstrap Carthage
run: carthage bootstrap --no-use-binaries --cache-builds
- name: Tests
run: |
set -o pipefail && xcodebuild test SWIFT_VERSION=${{ matrix.swift }} -workspace Action.xcworkspace -scheme Action -destination "platform=iOS Simulator,name=iPhone 11" | xcpretty -c --test
set -o pipefail && xcodebuild test SWIFT_VERSION=${{ matrix.swift }} -workspace Action.xcworkspace -scheme Action-macOS -destination "arch=x86_64" | xcpretty -c --test
- name: Builds
run: |
set -o pipefail && xcodebuild build SWIFT_VERSION=${{ matrix.swift }} -workspace Action.xcworkspace -scheme Action-watchOS -destination "platform=watchOS Simulator,name=Apple Watch Series 5 - 44mm" | xcpretty -c
set -o pipefail && xcodebuild build SWIFT_VERSION=${{ matrix.swift }} -workspace Action.xcworkspace -scheme Action-tvOS -destination "platform=tvOS Simulator,name=Apple TV 4K (at 1080p)" | xcpretty -c
1 change: 0 additions & 1 deletion .swift-version

This file was deleted.

12 changes: 7 additions & 5 deletions Action.podspec
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
Pod::Spec.new do |s|
s.name = "Action"
s.version = "3.11.0"
s.version = "5.0.0"
s.summary = "Abstracts actions to be performed in RxSwift."
s.description = <<-DESC
Encapsulates an action to be performed, usually by a button press, but also useful to pass actions to execute later
(once or multiple times) without having to expose other objects.
DESC
s.homepage = "https://github.com/RxSwiftCommunity/Action"
s.license = { :type => "MIT", :file => "License.md" }
s.author = { "Ash Furrow" => "[email protected]" }
s.author = { "RxSwift Community" => "[email protected]" }
s.social_media_url = "http://twitter.com/ashfurrow"

s.ios.deployment_target = '8.0'
s.ios.deployment_target = '9.0'
s.osx.deployment_target = '10.10'
s.watchos.deployment_target = '3.0'
s.tvos.deployment_target = '9.0'

s.source = { :git => "https://github.com/RxSwiftCommunity/Action.git", :tag => s.version.to_s }
s.source_files = "Sources/**/*.{swift}"

s.swift_version = '5.0'

s.frameworks = "Foundation"
s.dependency "RxSwift", "~> 4.0"
s.dependency "RxCocoa", "~> 4.0"
s.dependency "RxSwift", '~> 6.0'
s.dependency "RxCocoa", '~> 6.0'

s.watchos.exclude_files = "Control+Action.swift", "Button+Action.swift", "UIBarButtonItem+Action.swift", "UIAlertAction+Action.swift"
s.osx.exclude_files = "UIBarButtonItem+Action.swift", "UIAlertAction+Action.swift"
Expand Down
150 changes: 58 additions & 92 deletions Action.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "ReactiveX/RxSwift" ~> 4.4.2
github "ReactiveX/RxSwift" >= 6.0
6 changes: 3 additions & 3 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
github "Quick/Nimble" "v8.0.1"
github "Quick/Quick" "v2.0.0"
github "ReactiveX/RxSwift" "4.4.2"
github "Quick/Nimble" "v9.0.0"
github "Quick/Quick" "v3.1.2"
github "ReactiveX/RxSwift" "6.1.0"
188 changes: 1 addition & 187 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,187 +1 @@
Changelog
=========


Current master
--------------
3.11.0
-------
- Introduction of `underlyingError` observable which returns a `Swift.Error` element type.
- Updated specs that were breaking in `Circle CI` pipeline

3.10.2
-------
- Update the project and xcworkspace and make it compatible with Version 10.1 (10B61)
- Update the Unit test target and make it compatible with Version 10.1 (10B61)
- Moved CI to circle CI 2.0
- Fix issue [#155](https://github.com/RxSwiftCommunity/Action/issues/155)
- Fix issue [#179](https://github.com/RxSwiftCommunity/Action/issues/179)

3.10.0
-------
- Adding syntax sugar `execute()` method on `Action` when `Input` is `Void`. [#171](https://github.com/RxSwiftCommunity/Action/pull/171)
- Raises minimum watchOS deployment target to 3.0, to match RxSwift.

3.9.1
-----

- Less restrictive RxSwift/RxCocoa dependencies in podspec, now supporting RxSwift/RxCocoa 4.x starting with version 4.3

3.9.0
-----
- Fix Action Demo build failure
- Added missing support for Swift 4.2 after 3.7.0


3.8.0
-----

- Fix build failure on New Build System (default on Xcode 10) [#151](https://github.com/RxSwiftCommunity/Action/pull/151)

3.7.0
-----
- Added full support for Swift 4.2
- Added full support for RxSwift 4.3

3.6.0
-----
- Updated `Semantic Versioning` to reflect what is actaully released both on `Pod` and `Carthage`
- Added full support for Swift 4.1
- Added full support for RxSwift 4.2.0
- UIRefreshControl support: binding to an action (or CocoaAction) starts the action itself and updates the control's refreshing status

3.5.0
-----

- Add convenience initializer with work factories returning `PrimitiveSequence` or any other `ObservableConvertibleType` [#125](https://github.com/RxSwiftCommunity/Action/pull/125)
- Introduce `CompletableAction`, a typealias for action that only completes without emitting any elements [#125](https://github.com/RxSwiftCommunity/Action/pull/125)

3.4.0
-----
- Added full support for Swift 4.0
- Added full support for RxSwift 4.0.0
- Preserved old behavior for `shareReplay(1)` api changes from `RxSwift`. [#110](https://github.com/RxSwiftCommunity/Action/pull/110)


Version table
-------------

| Swift version | RxSwift version | Action version |
| ------------- | --------------- | -------------- |
| Swift 3.0 | v3.2.* | v2.2.0 |
| Swift 3.2 | v3.6.* | v3.2.0 |
| **Swift 4** | **v4.0.0** | **v3.4.0** |
| Swift 4.1 | **v4.2.0** | **v3.6.0** |

3.2.0
-----
- Add macOS bindings for NSControl and NSButton

3.1.1
-----

- Loosens dependency on RxSwift.

3.1.0
-----

- Replace `PublishSubject` with `InputSubject` [#92](https://github.com/RxSwiftCommunity/Action/pull/92)
- Added missing sources for watchOS target [#95](https://github.com/RxSwiftCommunity/Action/pull/95)

3.0.0
-----

- Change `bindTo([...])` methods to `bind(to: [...])` to better align with the revised Rx API
- Update Rx invocations to resolve deprecation warnings related to same

2.2.2
-----

- Remove `RxBlocking` from Linked Libraries in `Action` target

2.2.1
-----

- Loosens dependency on RxSwift.

2.2.0
-----

- Fixes [#63](https://github.com/RxSwiftCommunity/Action/issues/63), related to the default enabled state.
- Adds `bindTo(action:)` for non-CocoaAction.

2.1.1
-----

- Not replay `executionObservables` to fix `execute(_:)`. See [#64](https://github.com/RxSwiftCommunity/Action/pull/56).

2.1.0
-----

- Refactors internal implementation. See [#56](https://github.com/RxSwiftCommunity/Action/pull/56) and [#59](https://github.com/RxSwiftCommunity/Action/pull/59).
- Adds SwiftPM support. See [#58](https://github.com/RxSwiftCommunity/Action/pull/58).

2.0.0-beta.1
------------

- Adds Swift 3 support. See [#46](https://github.com/RxSwiftCommunity/Action/pull/46).

1.2.2
-----

- Added inputs subject to trigger actins by observables. See [#37](https://github.com/RxSwiftCommunity/Action/pull/37).
- Fixes a problem with observable deallocation related to `rx_action` button property. See [#33](https://github.com/RxSwiftCommunity/Action/pull/33).
- Improved Carthage compatibility. See [#34](https://github.com/RxSwiftCommunity/Action/pull/34).
- Swift 2.3 support.

1.2.1
-----

- Relaxes dependency requirements.

1.2.0
-----

- Updates to RxSwift 2.1.0.

1.1.0
-----

- Transitioned podspec to new remote URL (see [#15](https://github.com/RxSwiftCommunity/Action/issues/15)).
- Moved to RxSwift 2.0 🎉

1.2.2
-----

- Fixes memory leak when used on buttons. See [#21](https://github.com/RxSwiftCommunity/Action/issues/21).

1.2.1
-----

- Relaxes dependency requirements.

1.0.0
-----

- Unbounded replaying of event values (see [#3](https://github.com/ashfurrow/Action/issues/3)).

0.3.0
-----

Added `UIAlertAction` support.

0.2.1
-----

- Fixes `enabledIf:` parameter to be `Observable<B>`, `where B: BooleanType`.

0.2.0
-----

- Added tvOS support to UIButton extension.
- Changes `enabledIf` to accept `Observable<BooleanType>` instead of `Bool`.

0.1.0
-----

- Initial release.
#
8 changes: 4 additions & 4 deletions Demo/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="gBp-2p-Zj2">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="gBp-2p-Zj2">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
Expand Down Expand Up @@ -48,8 +48,8 @@
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<activityIndicatorView hidden="YES" opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" misplaced="YES" hidesWhenStopped="YES" style="gray" translatesAutoresizingMaskIntoConstraints="NO" id="OrY-7C-i77">
<rect key="frame" x="290" y="496" width="20" height="20"/>
<activityIndicatorView hidden="YES" opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" hidesWhenStopped="YES" style="gray" translatesAutoresizingMaskIntoConstraints="NO" id="OrY-7C-i77">
<rect key="frame" x="177.5" y="563" width="20" height="20"/>
</activityIndicatorView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Rn7-U4-1tI">
<rect key="frame" x="131" y="107" width="113" height="30"/>
Expand Down
38 changes: 19 additions & 19 deletions Demo/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class ViewController: UIViewController {
var disposableBag = DisposeBag()
let sharedAction = Action<SharedInput, String> { input in
switch input {
case .barButton: return Observable.just("UIBarButtonItem with 3 seconds delay").delaySubscription(3, scheduler: MainScheduler.instance)
case .barButton: return Observable.just("UIBarButtonItem with 3 seconds delay").delaySubscription(.seconds(3), scheduler: MainScheduler.instance)
case .button(let title): return .just("UIButton " + title)
}
}
Expand All @@ -39,20 +39,20 @@ class ViewController: UIViewController {

// Demo: add an action to a button in the view
let action = CocoaAction {
print("Button was pressed, showing an alert and keeping the activity indicator spinning while alert is displayed")
print("Button was pressed, showing an alert and keeping the activity indicator spinning while alert is displayed")
return Observable.create { [weak self] observer -> Disposable in
// Demo: show an alert and complete the view's button action once the alert's OK button is pressed
let alertController = UIAlertController(title: "Hello world", message: "This alert was triggered by a button action", preferredStyle: .alert)
var ok = UIAlertAction.Action("OK", style: .default)
ok.rx.action = CocoaAction {
print("Alert's OK button was pressed")
observer.onCompleted()
return .empty()
}
alertController.addAction(ok)
self?.present(alertController, animated: true, completion: nil)
// Demo: show an alert and complete the view's button action once the alert's OK button is pressed
let alertController = UIAlertController(title: "Hello world", message: "This alert was triggered by a button action", preferredStyle: .alert)
var ok = UIAlertAction.Action("OK", style: .default)
ok.rx.action = CocoaAction {
print("Alert's OK button was pressed")
observer.onCompleted()
return .empty()
}
alertController.addAction(ok)
self?.present(alertController, animated: true, completion: nil)

return Disposables.create()
return Disposables.create()
}
}

Expand All @@ -61,7 +61,7 @@ class ViewController: UIViewController {
// Demo: add an action to a UIBarButtonItem in the navigation item
self.navigationItem.rightBarButtonItem?.rx.action = CocoaAction {
print("Bar button item was pressed, simulating a 2 second action")
return Observable.empty().delaySubscription(2, scheduler: MainScheduler.instance)
return Observable.empty().delaySubscription(.seconds(2), scheduler: MainScheduler.instance)
}

// Demo: observe the output of both actions, spin an activity indicator
Expand Down Expand Up @@ -92,20 +92,20 @@ class ViewController: UIViewController {
}
self.navigationItem.leftBarButtonItem?.rx.bind(to: sharedAction, input: .barButton)

sharedAction.executing.debounce(0, scheduler: MainScheduler.instance).subscribe(onNext: { [weak self] executing in
sharedAction.executing.debounce(.seconds(0), scheduler: MainScheduler.instance).subscribe(onNext: { [weak self] executing in
if (executing) {
self?.activityIndicator.startAnimating()
}
else {
self?.activityIndicator.stopAnimating()
}
})
.disposed(by: self.disposableBag)
.disposed(by: self.disposableBag)

sharedAction.elements.subscribe(onNext: { string in
print(string + " pressed")
})
.disposed(by: self.disposableBag)
.disposed(by: self.disposableBag)


var refreshControl = UIRefreshControl()
Expand All @@ -114,10 +114,10 @@ class ViewController: UIViewController {
print("Reloading was triggered!")
return Observable
.empty()
.delaySubscription(2, scheduler: MainScheduler.instance)
.delaySubscription(.seconds(2), scheduler: MainScheduler.instance)
.do(onCompleted:{
print ("Reloading completed!")
})
})
}
}
}
2 changes: 1 addition & 1 deletion License.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 Ash Furrow
Copyright (c) 2021 Ash Furrow

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading