Skip to content

Instantly share code, notes, and snippets.

View end3r117's full-sized avatar

AR end3r117

  • Pasadena, CA
View GitHub Profile
@end3r117
end3r117 / README.MD
Last active September 23, 2020 04:20
202009022 - SwiftUI - iOS 14 - Tip Calculator / Toggle Button example
@end3r117
end3r117 / 20200828_UserProfileTest.swift
Created August 29, 2020 02:38
20200828 - UserProfileTest - | Reddit Reply | Async View Loading |
//
// UserProfileTest.swift
// MuckAbout
//
// Created by end3r117 on 8/28/20.
//
class PostViewModel: ObservableObject {
@Published private(set) var post: Post
@Published var loading: Bool = false
@end3r117
end3r117 / 20200728_ColorFinderGameExample.swift
Last active July 29, 2020 08:25
20200728 - SwiftUI | LazyXGrid | Combine - ColorFinder Flash Card Game (Reddit)
//
// 20200728_ColorFinderGameExample.swift
//
// Created by Anthony Rosario on 7/28/20.
//
import Combine
import SwiftUI
struct CardView: View {
@end3r117
end3r117 / 20200715_ShutterSpeedDemo.swift
Last active August 3, 2020 05:19
20200715 - SwiftUI | Combine | Reddit demo
//
// 20200715_ShutterSpeedDemo.swift
// MuckAbout
//
// Created by Anthony Rosario on 7/15/20.
//
import Combine
import SwiftUI
@end3r117
end3r117 / 20200630-SearchSuggestionsGoogleDemo.swift
Last active July 10, 2020 22:45
20200630 - Combine / SwiftUI - GoogleSearchSuggestions API Demo
//
// GoogleSearchSuggestionsAPI-DEMO.swift
//
// Created by Anthony Rosario on 6/30/20.
// Copyright © 2020 Anthony Rosario. All rights reserved.
//
import Combine
import SwiftUI
@end3r117
end3r117 / 20200616-RadialMenuDemo_AR.playground
Created June 17, 2020 00:43
SwiftUI - Simple example of a radial menu. Just helping someone on Reddit. Not production code.
import SwiftUI
import PlaygroundSupport
struct ContentView: View {
@GestureState private var showOverlay: Bool = false
@GestureState private var longDrag: CGPoint = .zero
@State private var currentButtonColorIndex: Array<Color>.Index = 0
@State private var newButtonColorIndex: Array<Color>.Index? = nil
private var currentButtonColor: Color {
@end3r117
end3r117 / SegmentedPickerExample.playground
Last active May 28, 2020 23:59
Playground: SwiftUI - SegmentedPicker custom control example
//SegmentedPickerExample.playground
//Created by (End3r117) on 5/28/20.
//
//Note: tiny indentation was intentional to paste into this gist. You might want to do a re-indent in XCode.
import SwiftUI
import PlaygroundSupport
fileprivate
struct SPPreferenceKey<Collection:RandomAccessCollection>: PreferenceKey {