| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
- swift documentation
- MVVM
- Xcode
- rxswift
- 리팩토링
- scrollview
- Clean Code
- map
- 애니메이션
- uiscrollview
- 스위프트
- RxCocoa
- Refactoring
- combine
- Protocol
- Observable
- tableView
- ios
- UICollectionView
- HIG
- collectionview
- SWIFT
- UITextView
- 리펙토링
- uitableview
- Human interface guide
- 클린 코드
- swiftUI
- clean architecture
- 클로드코드
- Today
- Total
목록interval (2)
김종권의 iOS 앱 개발 알아가기
편리함을 위한 사용한 프레임워크 pod 'RxSwift' pod 'RxCocoa' pod 'SnapKit' pod 'Then' 구현 아이디어 PhotoService라는 컴포넌트를 만든 후 이곳에서 Timer를 가지고 있고, 일정시간마다 이미지를 요청하여 Observable로 값 방출 단, 값이 바뀔때만 방출 (distinctUntilChanged) 사용하는쪽에서 PhotoService를 구독하고 있다가, 값이 방출되면 업데이트 구현 Photo값이 변경될때만 방출되도록 해야 하므로, Hashable 성격을 갖는 Photo모델 정의 // Photo.swift import UIKit struct Photo { var name: String var image: UIImage? { UIImage(named: se..
* 타이머 종류 - foreground에서만 동작하는 Timer - background에서도 동작하는듯한 Timer Foreground에서만 동작하는 Timer 변수 하나를 선언해놓고 RxSwift의 연산자 interval(_:scheduler:) 사용 // ViewController.swift private var currentCount = 0 private func setupOnlyForegroundTimer() { let timer = Observable.interval( .seconds(1), scheduler: MainScheduler.instance ) timer.withUnretained(self) .do(onNext: { weakSelf, countValue in weakSelf.curre..