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

Refactoring/sample app #61

Merged
merged 2 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ target 'RxAlert' do
use_frameworks!
pod 'RxSwift'
pod 'RxCocoa'
pod 'NSObject+Rx'
# Pods for RxAlert
end

Expand Down
16 changes: 7 additions & 9 deletions RxAlertExample/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
SOFTWARE.

*/

import NSObject_Rx
import RxAlert
import RxCocoa
import RxSwift
Expand All @@ -37,8 +37,6 @@ final class ViewController: UIViewController {
"Action sheet triple",
"Alert UITextField"]

let disposeBag = DisposeBag()

override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)

Expand Down Expand Up @@ -74,7 +72,7 @@ final class ViewController: UIViewController {
}
print("Action: \(output.alertAction)")
})
.disposed(by: disposeBag)
.disposed(by: rx.disposeBag)
}
}

Expand Down Expand Up @@ -110,7 +108,7 @@ extension ViewController: UITableViewDelegate {
.subscribe(onNext: { index in
print("index: \(index)")
})
.disposed(by: disposeBag)
.disposed(by: rx.disposeBag)
case 1:
rx.alert(title: "RxAlert",
message: "RxAlert Message",
Expand All @@ -120,7 +118,7 @@ extension ViewController: UITableViewDelegate {
.subscribe(onNext: { index in
print("index: \(index)")
})
.disposed(by: disposeBag)
.disposed(by: rx.disposeBag)
case 2:
rx.alert(title: "RxAlert",
message: "RxAlert Message",
Expand All @@ -129,7 +127,7 @@ extension ViewController: UITableViewDelegate {
.subscribe(onNext: { index in
print("index: \(index)")
})
.disposed(by: disposeBag)
.disposed(by: rx.disposeBag)
case 3:
rx.alert(title: "RxAlert",
message: "RxAlert Message",
Expand All @@ -141,7 +139,7 @@ extension ViewController: UITableViewDelegate {
.subscribe(onNext: { index in
print("index: \(index)")
})
.disposed(by: disposeBag)
.disposed(by: rx.disposeBag)
case 4:
let textField2 = UITextField()
textField2.textColor = .black
Expand All @@ -159,7 +157,7 @@ extension ViewController: UITableViewDelegate {
print(text)
}
}
}).disposed(by: disposeBag)
}).disposed(by: rx.disposeBag)
default: break
}
}
Expand Down
Loading