Skip to content

Instantly share code, notes, and snippets.

Chris Eidhof chriseidhof

Block or report user

Report or block chriseidhof

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View orview.swift
//
// ContentView.swift
// OrView
//
// Created by Chris Eidhof on 07.11.19.
// Copyright © 2019 Chris Eidhof. All rights reserved.
//
import SwiftUI
View bars.swift
//
// ContentView.swift
// Bars
//
// Created by Chris Eidhof on 17.12.19.
// Copyright © 2019 objc.io. All rights reserved.
//
import SwiftUI
View diagrams.swift
//
// Diagrams.swift
// DiagramsSample
//
// Created by Chris Eidhof on 16.12.19.
// Copyright © 2019 objc.io. All rights reserved.
//
import SwiftUI
View state-restoration.swift
struct Nested: View {
@State var counter = 0
init() {
print("Init")
}
var body: some View {
Button(action: { self.counter += 1 }, label: {
Text("Tap me! \(counter)")
})
}
View sample.swift
import SwiftUI
struct SizeKey: PreferenceKey {
static func reduce(value: inout CGSize?, nextValue: () -> CGSize?) {
value = value ?? nextValue()
}
}
struct ContentView: View {
@State var width: CGFloat? = nil
var body: some View {
View CV+ScrollView.swift
//
// ContentView.swift
// FlowLayoutST
//
// Created by Chris Eidhof on 22.08.19.
// Copyright © 2019 Chris Eidhof. All rights reserved.
//
import SwiftUI
struct FlowLayout {
View env.swift
//
// ContentView.swift
// OptionalViews
//
// Created by Chris Eidhof on 24.10.19.
// Copyright © 2019 objc.io. All rights reserved.
//
import SwiftUI
View keyframes.swift
//
// ContentView.swift
// KeyFrameAnimation
//
// Created by Chris Eidhof on 21.10.19.
// Copyright © 2019 objc.io. All rights reserved.
//
import SwiftUI
View shake.swift
//
// ContentView.swift
// Shake
//
// Created by Chris Eidhof on 01.10.19.
// Copyright © 2019 Chris Eidhof. All rights reserved.
//
import SwiftUI
View animationcurves.swift
//
// ContentView.swift
// AnimationTimingCurve
//
// Created by Chris Eidhof on 25.09.19.
// Copyright © 2019 Chris Eidhof. All rights reserved.
//
import SwiftUI
You can’t perform that action at this time.