본문 바로가기

반응형

전체 글

(103)
[iOS] GoogleMap 마커, 경로 사용하기 1 ) GoogleMap 추가하기 https://developers.google.com/maps/documentation/ios-sdk/overview?hl=ko GoogleMap을 사용하기 위해선 우선 API 키를 발급 받아야합니다. 위 링크에서 API키를 발급 받았다면, AppDelegate didFinishLaunchingWithOptions 함수에 구글맵을 연동하는 코드를 작성합니다. func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization..
[Swift] UI - Dynamic TableView 높낮이를 컨텐츠 사이즈에 따라 알아서 맞춰주는 테이블 뷰! CustomView 추가 import Foundation import UIKit class UIDynamicSizeTableView: UITableView { override var intrinsicContentSize: CGSize { let height = self.contentSize.height + self.contentInset.top + self.contentInset.bottom return CGSize(width: self.contentSize.width, height: height) } override func layoutSubviews() { self.invalidateIntrinsicContentSize() super.layo..
[iOS] YoutubePlayer 사용하기 GitHub - youtube/youtube-ios-player-helper: Lightweight helper library that allows iOS developers to add inline playback of YouT Lightweight helper library that allows iOS developers to add inline playback of YouTube videos through a WebView - GitHub - youtube/youtube-ios-player-helper: Lightweight helper library that allows... github.com iOS 에 쉽고 빠르게 동영상 플레이어를 얹는 법 Youtube 플레이어 (YoutubePlayer_i..
[Code Convention] API Model 개선하기 기존 모델 // --------------- Model ------------- // /// ApiModel의 Request struct ApiModel_Req: Codable { } /// ApiModel의 Response struct ApiModel: BaseResponse, Codable { } /// 구조체 struct Model: Codable { } // --------------- ViewModel ------------- // let request = ApiModel_Req() let response = ApiModel() let data = Model() 불편한 점 : Model과 ApiModel 간의 구분하기 어려움 개선 제안 : ApiModel_Req처럼 ApiModel을 ApiMod..
[RxSwift] bind, driver, relay GitHub - ReactiveX/RxSwift: Reactive Programming in Swift Reactive Programming in Swift. Contribute to ReactiveX/RxSwift development by creating an account on GitHub. github.com RxSwift 6.1 Bind Bind와 Driver 모두 메인 스케줄러에서 실행되며 에러 이벤트를 따로 방출하지 않는다. UI와 관련된 operator이며 UI와 Observable을 하나로 묶는다. 에러를 뱉지 않기 때문에 UI 핸들링으로 활용하는 것이 적합하다! bind를 사용하게 되면 아래와 같이 방출한 이벤트 그대로를 label의 텍스트와 bind 한다. Observable을 구독하..
[RxSwift] Mathematical & Aggregate, Connectable Observable Operators ReactiveX - Observable Observable In ReactiveX an observer subscribes to an Observable. Then that observer reacts to whatever item or sequence of items the Observable emits. This pattern facilitates concurrent operations because it does not need to block while waiting for the Ob reactivex.io Mathematical & Aggregate Operators 종류 Concat Reduce Concat 둘 이상의 Observable 을 끼워넣어 방출한다. Observable을 직렬로 ..
[RxSwift] Conditional & Boolean Operators ReactiveX - Operators Introduction Each language-specific implementation of ReactiveX implements a set of operators. Although there is much overlap between implementations, there are also some operators that are only implemented in certain implementations. Also, each implementa reactivex.io Conditional & Boolean Operators 종류 Amb Skip (skip:) Skip (while:) Take (Until:) Take (while:) Amb 두 개 이상의 ..
[RxSwift] Observable Utility Operators ReactiveX 한국어 runebook.dev Observable Utility Operators Delay Do Materialize / Dematerialize Timeout Using Serialize ObserveOn SubscribeOn Delay Observable을 특정 시간만큼 이동히여 방출을 늦춘다. Observable의 각 항목을 방출하기 전의 특정 시간 단위 동안 일시정지하여 Observable을 수정한다. Observable에 의해 방출된 항목의 전체 시퀀스를 지정된 증가만큼 앞으로 이동시키는 효과가 있다. Observable.of(1, 2, 3, 4) .delay(DispatchTimeInterval.seconds(3), scheduler: MainScheduler.instanc..

반응형