Skip to content

Instantly share code, notes, and snippets.

View pg8wood's full-sized avatar
:shipit:
Gettin Schwifty

Patrick Gatewood pg8wood

:shipit:
Gettin Schwifty
View GitHub Profile
@pg8wood
pg8wood / AnyProgressViewStyleTypeErasureExample.swift
Last active July 2, 2020 15:52
An attempt at creating my own type erasure similar to `AnyView`. Not recommended unless we figure out a way to restore `AnyProgressviewStyle`'s wrapped view's type. See: https://forums.swift.org/t/why-some-swiftui-views-have-body-swift-never/27372/8
//
// ProgressViews.swift
// wwdc-2020
//
// Created by Patrick Gatewood on 6/30/20.
import SwiftUI
import Combine
// MARK: - Type Erasure
@pg8wood
pg8wood / AnyProgressViewStyleTypeErasureExample.swift
Created July 2, 2020 15:27
An attempt at creating my own type erasure similar to `AnyView`. Not recommended unless we figure out a way to restore `AnyProgressviewStyle`'s wrapped view's type. See:https://forums.swift.org/t/why-some-swiftui-views-have-body-swift-never/27372/8
//
// ProgressViews.swift
// wwdc-2020
//
// Created by Patrick Gatewood on 6/30/20.
//
// An attempt at creating my own type erasure similar to `AnyView`. Not recommended
// unless we figure out a way to restore `AnyProgressviewStyle`'s wrapped view's type.
// See:https://forums.swift.org/t/why-some-swiftui-views-have-body-swift-never/27372/8