This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by Darren Hurst on 2023-02-14. | |
// | |
import Foundation | |
import SwiftUI | |
struct SomeCart: View { | |
@ObservedObject var view = ViewModel() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
enum Users: String, Identifiable, CaseIterable, Equatable { | |
static var allCases: [Self] { | |
return [all] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import SwiftUI | |
struct basicPadding: ViewModifier { | |
func body(content: Content) -> some View { | |
content.padding(10) | |
} | |
} | |
extension View { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum Users: String, Identifiable, CaseIterable, Equatable { | |
static var allCases: [Users] { | |
return [.snoopy, .charlie, .sally, .lucy] | |
} | |
var id: Self { | |
return self | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import SwiftUI | |
struct ProgressCircle: View { | |
@State var runAnimation: Bool = false | |
fileprivate func dials() -> some View{ | |
VStack{ | |
ZStack { | |
Circle() | |
.stroke( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import SwiftUI | |
struct NikeSwipeControl: View { | |
@State private var isDragging = false | |
@State private var xlocation: CGFloat = 0 | |
@State var x: CGFloat = 0 | |
@State var y: CGFloat = 0 | |
@State var z: CGFloat = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import SwiftUI | |
struct NikeShoppingView : View { | |
@ObservedObject var view: ShoppingData = ShoppingData() | |
@State private var isDragging = false | |
@State private var xlocation: CGFloat | |
var style = StrokeStyle(lineWidth: 2) | |
var drag: some Gesture { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import SwiftUI | |
struct NikeShoppingView : View { | |
var ballX: Int = 0 | |
var drag = DragGesture() | |
.onEnded { | |
if $0.translation.width < -100 { | |
withAnimation { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import SwiftUI | |
struct MessageCenter: View { | |
@Environment(\.dismiss) var dismiss | |
@ObservedObject var view:ViewModel = ViewModel() | |
@State var text: String = "" | |
@State private var particleSystem = ParticleView() | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import SwiftUI | |
import UIKit | |
struct ScrollList: View { | |
@Environment(\.colorScheme) var colorScheme | |
@State var blinking: Bool = false | |
@State var showView: Bool = false |