Skip to content

Instantly share code, notes, and snippets.

Daniel Tartaglia danielt1263

View GitHub Profile
@danielt1263
danielt1263 / RetryingTokenNetworkService.swift
Last active Jun 30, 2020
The TokenAcquisitionService automatically retry requests if it receives an unauthorized error. Complete with proof that it works correctly.
View RetryingTokenNetworkService.swift
//
// RetryingTokenNetworkService.swift
//
// Created by Daniel Tartaglia on 16 Jan 2019.
// Copyright © 2019 Daniel Tartaglia. MIT License.
//
import Foundation
import RxSwift
View Store.swift
//
// Store.swift
//
// Created by Daniel Tartaglia on 3/11/17.
// Copyright © 2020 Daniel Tartaglia. MIT License
//
import Foundation
import RxSwift
View PaginationNetworkLogic.swift
//
// PaginationNetworkLogic.swift
//
// Created by Daniel Tartaglia on 4/9/17.
// Copyright © 2019 Daniel Tartaglia. MIT License
//
import RxSwift
struct PaginationUISource {
View ObservableEventTransforms.swift
//
// ObservableEventTransforms.swift
//
// Created by Daniel Tartaglia on 9/22/18.
// Copyright © 2019 Daniel Tartaglia. MIT License.
//
import RxSwift
/**
@danielt1263
danielt1263 / Signal.swift
Last active May 15, 2020
Swift replacement for KVO
View Signal.swift
//
// Signal.swift
//
// Created by Daniel Tartaglia on 9/6/15.
// Copyright © 2016 Daniel Tartaglia. MIT License.
//
public protocol Disposable {
func dispose()
}
@danielt1263
danielt1263 / RetryWhen.swift
Last active Apr 22, 2020
I have implemented RetryWhen in Combine.
View RetryWhen.swift
//
// RetryWhen.swift
// CombineSandbox
//
// Created by Daniel Tartaglia on 9/27/19.
// Copyright © 2019 Daniel Tartaglia. MIT License.
//
import Foundation
import Combine
View EmitWhile.swift
//
// EmitWhile.swift
//
// Created by Daniel Tartaglia on 09/06/2018.
// Copyright © 2019 Daniel Tartaglia. MIT License.
//
import Foundation
import RxSwift
View RxKeyboardController.swift
final class ViewController: UIViewController {
@IBOutlet weak var bottomConstraint: NSLayoutConstraint!
private let disposeBag = DisposeBag()
override func viewDidLoad() {
super.viewDidLoad()
// avoid keyboard.
View ThrottleUnlessChanged.swift
//
// ThrottleUnlessChanged.swift
//
// Created by Daniel Tartaglia on 6 Jan 2019.
// Copyright © 2020 Daniel Tartaglia. MIT License.
//
import RxSwift
public extension ObservableType where Element: Equatable {
View ObservableResultTransforms.swift
//
// ObservableResultTransforms.swift
//
// Created by Daniel Tartaglia on 5/10/2019.
// Copyright © 2019 Daniel Tartaglia. MIT License.
//
import RxSwift
/**
You can’t perform that action at this time.