Skip to content

Instantly share code, notes, and snippets.

View brotskydotcom's full-sized avatar

Daniel Brotsky brotskydotcom

View GitHub Profile
@brotskydotcom
brotskydotcom / gist:a5a41eec5419aaaef5e3aceb75e1921c
Last active April 17, 2023 08:26
A decimal number input/edit control for SwiftUI.
// Created by Daniel Brotsky on 02/02/2020 (aka "international palindrome day").
// Based on code from this StackOverflow question:
// https://stackoverflow.com/q/59621625/558006
// No Copyright is asserted on this code.
//
import SwiftUI
import Combine
//MARK: - Parse and format decimal strings with remembered precision