Skip to content

Commit

Permalink
Merge pull request #61 from keisukeYamagishi/refactoring/sample-app
Browse files Browse the repository at this point in the history
Refactoring/sample app
  • Loading branch information
keisukeYamagishi authored Oct 30, 2023
2 parents 371cb81 + 562adbf commit 45fe474
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
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

0 comments on commit 45fe474

Please sign in to comment.