Skip to content

Instantly share code, notes, and snippets.

View DarrenHurst's full-sized avatar

Darren Hurst DarrenHurst

View GitHub Profile
@vrutberg
//
// box.swift
// Designer
//
// Created by Darren Hurst on 2024-03-27.
//
import SwiftUI
@DarrenHurst
DarrenHurst / Egg3
Created March 24, 2024 23:15
SwiftUIHop Egg3
import SwiftUI
struct Egg3: View {
@State var openSpot: Int = 1
@State var image1Location: CGSize = CGSize()
@State var image2Location: CGSize = CGSize()
@State var image3Location: CGSize = CGSize()
@State var image4Location: CGSize = CGSize()
@State var opacityLevel: CGFloat = 0.1
//
// SwiftUIView.swift
// Designer
//
// Created by Darren Hurst on 2024-03-06.
//
import SwiftUI
import OFCore
@DarrenHurst
DarrenHurst / WonderFile002
Last active March 3, 2024 15:09
SwiftUIHop WonderFile002
//
// Bunny.swift
// Designer
//
// Created by Darren Hurst on 2024-03-02.
//
import Foundation
import SwiftUI
import OFCore
import Foundation
import SwiftUI
import PencilKit
struct DrawingView: View {
private var canvasView = PKCanvasView()
var body: some View {
MyCanvas(canvasView: canvasView)
}
@DarrenHurst
DarrenHurst / AModule
Created February 13, 2024 19:56
Modules Swift Package
import Foundation
import SwiftUI
// MARK: Shop Component List
@available(iOS 16.0, *)
public enum ShopComponents: StringLiteralType {
public var id: Self {
return self
}
@DarrenHurst
DarrenHurst / Rating
Created February 6, 2024 21:07
Rating Control
import Foundation
import SwiftUI
struct Rating: View {
@State var loadView = false
var value = 1.8
var numberOf = 5
var image = Image(systemName: "star")
var image2 = Image(systemName: "star")
var color: Color = .white
@DarrenHurst
DarrenHurst / Data
Created January 27, 2024 01:23
Churck Norris Redacted.
import Foundation
//Data Response and View Model
final class ChuckNorrisJoke: Codable {
var value: String?
var icon_url: String?
}
//Interactor
@DarrenHurst
DarrenHurst / Theme
Created January 15, 2024 14:15
ThemeProtocol Builder
//
// File.swift
//
//
// Created by Darren Hurst on 2024-01-03.
//
import Foundation
import SwiftUI
@DarrenHurst
DarrenHurst / rbutton
Created January 2, 2024 13:39
Generic Button Swiftui
import Foundation
import SwiftUI
@available(iOS 16.0, *)
struct RenderButton: View, Identifiable {
var id : UUID = UUID()
var text: String?
var image: Image?