시나리오 import RxSwift import RxCocoa let disposeBag = DisposeBag() struct Student { var score: BehaviorRelay } let john = Student(score: BehaviorRelay(value: 75)) let mary = Student(score: BehaviorRelay(value: 95)) let student = PublishSubject() score을 가지고 있는 Student 타입을 관찰하기 위해 student라는 subject를 만들었다 [ 1 ] FlatMap student.flatMap { $0.score } .subscribe(onNext: { print($0) }).disposed(by: dispos..
[ 1 ] Unit Testing 이란 implement the feature and write the test…. & implement the feature and write the test…. & implement the feature and write the test…. ..... feature을 구현하고 test를 작성하고… 를 계속 반복하는 것이 유닛 테스팅이다 [ 2 ] 간단한 예제 - Calculator class Calculator { func add(_ a: Int, _ b: Int) -> Int { return a + b } func subtract(_ a: Int, _ b: Int) -> Int { return a - b } } Calculator에 구현한 더하기 빼기 기능이 잘못된 ..
1. Subject 1.1 Publish Subject - default값(초기값)이 없다 - 다른 옵져버가 subscribe한 순간 아무것도 주지 않지만 데이터가 발생하면 다 준다 1.2 Behavior Subject - default(초기값) 을 넣어주어야한다 - 값이 없을때 (초기값만 있을 때) subscribe하면 초기값을 주고, 값이 있을때 subcribe하면가장 최근의 것을 준다 - 중간에 error가 나면 subscribe하고 있는 모든 옵져버들한테 에러가 간다 1.3 ReplaySubject - default값(초기값)이 없다 - 다른 옵져버가 subscribe하면 여태까지 발생했던것 다 준다 1.4 AsyncSubject - default값(초기값)이 없다 - Subject가 comple..
1. Subject란 Observable과 Observer 모두로 동작할 수 있다. Subject는 ObservableType프로토콜을 채택하고 있는 Observable을 상속하고 있고 ObserverType프로토콜을 채택하고 있기 때문이다. 쉽게 말하면, 데이터를 넣어줄 수도 있고(emit시킬수도 있고), subscribe할 수도 있다. let subject = PublishSubject() let subcriptionOne = subject.subscribe(onNext: { (string) in print(string) }) subject.on(.next("1")) subject.onNext("2") Observable.just(3).subscribe(subject).disposed(by: disp..
- Total
- Today
- Yesterday
- ipad multitasking
- flutter 앱 출시
- Python Type Hint
- Flutter Spacer
- drf custom error
- 장고 URL querystring
- Django FCM
- Sketch 누끼
- flutter dynamic link
- github actions
- Watch App for iOS App vs Watch App
- Flutter Text Gradient
- SerializerMethodField
- Django Heroku Scheduler
- flutter build mode
- Flutter getter setter
- Django Firebase Cloud Messaging
- 플러터 얼럿
- cocoapod
- 장고 Custom Management Command
- METAL
- ribs
- DRF APIException
- PencilKit
- 플러터 싱글톤
- 구글 Geocoding API
- Flutter Clipboard
- flutter deep link
- Flutter 로딩
- Dart Factory
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |