Skip to content

Instantly share code, notes, and snippets.

View Thomas-Vos's full-sized avatar

Thomas Vos Thomas-Vos

View GitHub Profile
@IanKeen
IanKeen / Redraw.swift
Last active February 28, 2023 21:20
PropertyWrapper: Automatically redraw UIViews when a value changes
@propertyWrapper
struct Redraw<Value> {
var wrappedValue: Value
init(wrappedValue: Value) {
self.wrappedValue = wrappedValue
}
static subscript<Instance: UIView>(
_enclosingInstance instance: Instance,