Skip to content

Instantly share code, notes, and snippets.

@timstudt
timstudt / SwiftUI.playground
Created January 8, 2021 10:30
SwiftUI playground crash
import SwiftUI
import PlaygroundSupport
struct ContentView: View {
var body: some View {
List {
ForEach((1...10).reversed(), id: \.self) {
Text("\($0)")
}
@timstudt
timstudt / ViewStates.playground
Created January 17, 2019 09:11
Swift Playground: View State for communicating changes from Presenter to View
//: A UIKit based Playground for presenting user interface
import UIKit
import PlaygroundSupport
// Models
struct MyViewModel: Equatable { let text: String }
enum MyError: Error, Equatable {