Skip to content

Instantly share code, notes, and snippets.

View iStefo's full-sized avatar

Stefan Fochler iStefo

  • Munich, Germany
View GitHub Profile
@iStefo
iStefo / countAndUpdateUI.swift
Last active April 28, 2018 20:15 — forked from jasonyunjoonpark/countAndUpdateUI.swift
completion handler for a function that takes a parameter
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
DispatchQueue.global(qos: .userInteractive).async {
//Background thread

"Model-dependent query param stickiness"

The question of whether query param controller properties are preserved/restored/reset when navigating away/back/between routes is a tricky one, but the sensible default seems to be "model-dependent stickiness", whereby query params are stick unless you're switching the model of the current or parent routes. There's more that could be said about this but here's a quick summary of my plan:

  • We need a dictionary to store QP state scoped to a model