├── .DS_Store
├── .gitignore
├── NotificationDelegate
├── .DS_Store
├── NotificationDelegate.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcuserdata
│ │ │ └── peterlamar.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── peterlamar.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
├── NotificationDelegate
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ ├── Base.lproj
│ │ └── LaunchScreen.storyboard
│ ├── ContentView.swift
│ ├── Info.plist
│ ├── LocalNotificationManager.swift
│ ├── Preview Content
│ │ └── Preview Assets.xcassets
│ │ │ └── Contents.json
│ └── SceneDelegate.swift
├── NotificationDelegateTests
│ ├── Info.plist
│ └── NotificationDelegateTests.swift
├── NotificationDelegateUITests
│ ├── Info.plist
│ └── NotificationDelegateUITests.swift
└── README.md
├── README.md
├── UIKitBasics
├── UIKitBasics.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcuserdata
│ │ │ └── peterlamar.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── peterlamar.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
├── UIKitBasics
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Background.imageset
│ │ │ ├── Background.jpg
│ │ │ ├── Background@2x.jpg
│ │ │ ├── Background@3x.jpg
│ │ │ └── Contents.json
│ │ ├── Contents.json
│ │ ├── Email.imageset
│ │ │ ├── Contents.json
│ │ │ ├── Email.png
│ │ │ ├── Email@2x.png
│ │ │ └── Email@3x.png
│ │ ├── FB.imageset
│ │ │ ├── Contents.json
│ │ │ ├── FB.png
│ │ │ ├── FB@2x.png
│ │ │ └── FB@3x.png
│ │ └── Google.imageset
│ │ │ ├── Contents.json
│ │ │ ├── Google.png
│ │ │ ├── Google@2x.png
│ │ │ └── Google@3x.png
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Info.plist
│ ├── README.md
│ ├── SceneDelegate.swift
│ └── ViewController.swift
├── UIKitBasicsTests
│ ├── Info.plist
│ └── UIKitBasicsTests.swift
└── UIKitBasicsUITests
│ ├── Info.plist
│ └── UIKitBasicsUITests.swift
├── UIKitNotification
├── .DS_Store
├── NtnExl
│ ├── Base.lproj
│ │ └── MainInterface.storyboard
│ ├── Info.plist
│ └── NotificationViewController.swift
├── UIKitNotification.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcuserdata
│ │ │ └── peterlamar.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── peterlamar.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
├── UIKitNotification
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ ├── Base.lproj
│ │ └── LaunchScreen.storyboard
│ ├── ContentView.swift
│ ├── Info.plist
│ ├── Preview Content
│ │ └── Preview Assets.xcassets
│ │ │ └── Contents.json
│ └── SceneDelegate.swift
├── UIKitNotificationTests
│ ├── Info.plist
│ └── UIKitNotificationTests.swift
└── UIKitNotificationUITests
│ ├── Info.plist
│ └── UIKitNotificationUITests.swift
├── animatedButtons
├── .DS_Store
├── animatedButtons.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcuserdata
│ │ │ └── peterlamar.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── peterlamar.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
├── animatedButtons
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ ├── Base.lproj
│ │ └── LaunchScreen.storyboard
│ ├── ContentView.swift
│ ├── Info.plist
│ ├── Preview Content
│ │ └── Preview Assets.xcassets
│ │ │ └── Contents.json
│ └── SceneDelegate.swift
├── animatedButtonsTests
│ ├── Info.plist
│ └── animatedButtonsTests.swift
├── animatedButtonsUITests
│ ├── Info.plist
│ └── animatedButtonsUITests.swift
├── normal.png
├── pressed.png
└── readme.md
├── awsTodo
├── .gitignore
├── .graphqlconfig.yml
├── API.swift
├── Podfile
├── Podfile.lock
├── Shared
│ ├── .gitignore
│ ├── Assets.xcassets
│ │ ├── AccentColor.colorset
│ │ │ └── Contents.json
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ ├── ContentView.swift
│ ├── amplify
│ │ ├── .config
│ │ │ └── project-config.json
│ │ ├── README.md
│ │ ├── backend
│ │ │ ├── backend-config.json
│ │ │ └── tags.json
│ │ └── team-provider-info.json
│ └── awsTodoApp.swift
├── amplify
│ ├── .config
│ │ └── project-config.json
│ ├── README.md
│ ├── backend
│ │ ├── api
│ │ │ └── amplifyDatasource
│ │ │ │ ├── parameters.json
│ │ │ │ ├── schema.graphql
│ │ │ │ ├── stacks
│ │ │ │ └── CustomResources.json
│ │ │ │ └── transform.conf.json
│ │ └── backend-config.json
│ ├── cli.json
│ ├── generated
│ │ └── models
│ │ │ ├── AmplifyModels.swift
│ │ │ ├── Priority.swift
│ │ │ ├── Todo+Schema.swift
│ │ │ └── Todo.swift
│ └── team-provider-info.json
├── awsTodo.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcuserdata
│ │ │ └── plamar.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── plamar.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
├── awsTodo.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── xcuserdata
│ │ └── plamar.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
├── graphql
│ ├── mutations.graphql
│ ├── queries.graphql
│ ├── schema.json
│ └── subscriptions.graphql
├── iOS
│ └── Info.plist
├── macOS
│ ├── Info.plist
│ └── macOS.entitlements
└── readme.md
├── buttonChangeText
├── README.md
├── buttonChangeText.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcuserdata
│ │ │ └── peterlamar.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── peterlamar.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
├── buttonChangeText
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ ├── Base.lproj
│ │ └── LaunchScreen.storyboard
│ ├── ContentView.swift
│ ├── Info.plist
│ ├── Preview Content
│ │ └── Preview Assets.xcassets
│ │ │ └── Contents.json
│ └── SceneDelegate.swift
├── buttonChangeTextTests
│ ├── Info.plist
│ └── buttonChangeTextTests.swift
└── buttonChangeTextUITests
│ ├── Info.plist
│ └── buttonChangeTextUITests.swift
├── buttonStateChange
├── buttonStateChange.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcuserdata
│ │ │ └── peterlamar.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── peterlamar.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
├── buttonStateChange
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ ├── Base.lproj
│ │ └── LaunchScreen.storyboard
│ ├── ContentView.swift
│ ├── Info.plist
│ ├── Preview Content
│ │ └── Preview Assets.xcassets
│ │ │ └── Contents.json
│ └── SceneDelegate.swift
├── buttonStateChangeTests
│ ├── Info.plist
│ └── buttonStateChangeTests.swift
└── buttonStateChangeUITests
│ ├── Info.plist
│ └── buttonStateChangeUITests.swift
├── coreDataRelationships
├── .DS_Store
├── README.md
├── coreDataRelationships.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcuserdata
│ │ │ └── peterlamar.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── peterlamar.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
├── coreDataRelationships
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ ├── Base.lproj
│ │ └── LaunchScreen.storyboard
│ ├── Candy+CoreDataClass.swift
│ ├── Candy+CoreDataProperties.swift
│ ├── ContentView.swift
│ ├── Country+CoreDataClass.swift
│ ├── Country+CoreDataProperties.swift
│ ├── Info.plist
│ ├── Preview Content
│ │ └── Preview Assets.xcassets
│ │ │ └── Contents.json
│ ├── SceneDelegate.swift
│ └── coreDataRelationships.xcdatamodeld
│ │ ├── .xccurrentversion
│ │ └── coreDataRelationships.xcdatamodel
│ │ └── contents
├── coreDataRelationshipsTests
│ ├── Info.plist
│ └── coreDataRelationshipsTests.swift
├── coreDataRelationshipsUITests
│ ├── Info.plist
│ └── coreDataRelationshipsUITests.swift
└── coredatarel.png
├── coredatasample
├── README.md
├── coredata.png
├── coredatasample.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcuserdata
│ │ │ └── peterlamar.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── peterlamar.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
├── coredatasample
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ ├── Base.lproj
│ │ └── LaunchScreen.storyboard
│ ├── ContentView.swift
│ ├── Info.plist
│ ├── Preview Content
│ │ └── Preview Assets.xcassets
│ │ │ └── Contents.json
│ ├── SceneDelegate.swift
│ └── coredatasample.xcdatamodeld
│ │ ├── .xccurrentversion
│ │ └── coredatasample.xcdatamodel
│ │ └── contents
├── coredatasampleTests
│ ├── Info.plist
│ └── coredatasampleTests.swift
└── coredatasampleUITests
│ ├── Info.plist
│ └── coredatasampleUITests.swift
├── exclusiveButtons
├── .DS_Store
├── exclusiveButtons.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcuserdata
│ │ │ └── peterlamar.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── peterlamar.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
├── exclusiveButtons
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ ├── Base.lproj
│ │ └── LaunchScreen.storyboard
│ ├── ContentView.swift
│ ├── Info.plist
│ ├── Preview Content
│ │ └── Preview Assets.xcassets
│ │ │ └── Contents.json
│ └── SceneDelegate.swift
├── exclusiveButtonsTests
│ ├── Info.plist
│ └── exclusiveButtonsTests.swift
└── exclusiveButtonsUITests
│ ├── Info.plist
│ └── exclusiveButtonsUITests.swift
├── exclusiveLists
├── Shared
│ ├── Assets.xcassets
│ │ ├── AccentColor.colorset
│ │ │ └── Contents.json
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ ├── ContentView.swift
│ └── exclusiveListsApp.swift
├── exclusiveLists.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcuserdata
│ │ │ └── plamar.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── plamar.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
├── iOS
│ └── Info.plist
└── macOS
│ ├── Info.plist
│ └── macOS.entitlements
├── firebaseswift2
├── .gitignore
├── Podfile
├── Podfile.lock
├── README.md
├── Shared
│ ├── Assets.xcassets
│ │ ├── AccentColor.colorset
│ │ │ └── Contents.json
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ ├── ContentView.swift
│ └── firebaseswift2App.swift
├── firebaseswift2.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
├── firebaseswift2.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── macOS
│ └── macOS.entitlements
├── listinlist
├── listinlist.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcuserdata
│ │ │ └── peterlamar.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── peterlamar.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
├── listinlist
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ ├── Base.lproj
│ │ └── LaunchScreen.storyboard
│ ├── ContentView.swift
│ ├── Info.plist
│ ├── Preview Content
│ │ └── Preview Assets.xcassets
│ │ │ └── Contents.json
│ └── SceneDelegate.swift
├── listinlistTests
│ ├── Info.plist
│ └── listinlistTests.swift
└── listinlistUITests
│ ├── Info.plist
│ └── listinlistUITests.swift
├── photoLibrary
├── Shared
│ ├── Assets.xcassets
│ │ ├── AccentColor.colorset
│ │ │ └── Contents.json
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ ├── ContentView.swift
│ └── photoLibraryApp.swift
├── iOS
│ └── Info.plist
├── macOS
│ ├── Info.plist
│ └── macOS.entitlements
└── photoLibrary.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── xcuserdata
│ │ └── plamar.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ └── plamar.xcuserdatad
│ └── xcschemes
│ └── xcschememanagement.plist
├── sublistDelete
├── .DS_Store
├── delete.png
├── normal.png
├── readme.md
├── sublistDelete.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcuserdata
│ │ │ └── peterlamar.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── peterlamar.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
├── sublistDelete
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ ├── Base.lproj
│ │ └── LaunchScreen.storyboard
│ ├── ContentView.swift
│ ├── Info.plist
│ ├── Preview Content
│ │ └── Preview Assets.xcassets
│ │ │ └── Contents.json
│ └── SceneDelegate.swift
├── sublistDeleteTests
│ ├── Info.plist
│ └── sublistDeleteTests.swift
└── sublistDeleteUITests
│ ├── Info.plist
│ └── sublistDeleteUITests.swift
├── transitionButtons
├── .DS_Store
├── Simulator Screen Shot - iPhone SE (2nd generation) - 2020-04-29 at 15.57.38.png
├── Simulator Screen Shot - iPhone SE (2nd generation) - 2020-04-29 at 15.57.40.png
├── readme.md
├── transitionButtons.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcuserdata
│ │ │ └── peterlamar.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── peterlamar.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
├── transitionButtons
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ ├── Base.lproj
│ │ └── LaunchScreen.storyboard
│ ├── ContentView.swift
│ ├── Info.plist
│ ├── Preview Content
│ │ └── Preview Assets.xcassets
│ │ │ └── Contents.json
│ └── SceneDelegate.swift
├── transitionButtonsTests
│ ├── Info.plist
│ └── transitionButtonsTests.swift
└── transitionButtonsUITests
│ ├── Info.plist
│ └── transitionButtonsUITests.swift
├── userActionNotification
├── .DS_Store
├── README.md
├── userActionNotification.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcuserdata
│ │ │ └── peterlamar.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── peterlamar.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
├── userActionNotification
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ ├── Base.lproj
│ │ └── LaunchScreen.storyboard
│ ├── ContentView.swift
│ ├── Info.plist
│ ├── Preview Content
│ │ └── Preview Assets.xcassets
│ │ │ └── Contents.json
│ └── SceneDelegate.swift
├── userActionNotificationTests
│ ├── Info.plist
│ └── userActionNotificationTests.swift
├── userActionNotificationUITests
│ ├── Info.plist
│ └── userActionNotificationUITests.swift
└── userNotificationExt
│ ├── Base.lproj
│ └── MainInterface.storyboard
│ ├── Info.plist
│ └── NotificationViewController.swift
├── usernotification
├── .DS_Store
├── README.md
├── usernotification.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcuserdata
│ │ │ └── peterlamar.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── peterlamar.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
├── usernotification
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ ├── Base.lproj
│ │ └── LaunchScreen.storyboard
│ ├── ContentView.swift
│ ├── Info.plist
│ ├── Preview Content
│ │ └── Preview Assets.xcassets
│ │ │ └── Contents.json
│ └── SceneDelegate.swift
├── usernotificationTests
│ ├── Info.plist
│ └── usernotificationTests.swift
└── usernotificationUITests
│ ├── Info.plist
│ └── usernotificationUITests.swift
├── viewbuilder
├── README.md
├── viewbuilder.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcuserdata
│ │ │ └── peterlamar.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── peterlamar.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
├── viewbuilder
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ ├── Base.lproj
│ │ └── LaunchScreen.storyboard
│ ├── ContentView.swift
│ ├── Info.plist
│ ├── Preview Content
│ │ └── Preview Assets.xcassets
│ │ │ └── Contents.json
│ └── SceneDelegate.swift
├── viewbuilderTests
│ ├── Info.plist
│ └── viewbuilderTests.swift
└── viewbuilderUITests
│ ├── Info.plist
│ └── viewbuilderUITests.swift
└── warCardGame
├── README.md
├── warCardGame.xcodeproj
├── project.pbxproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── xcuserdata
│ │ └── peterlamar.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
└── xcuserdata
│ └── peterlamar.xcuserdatad
│ └── xcschemes
│ └── xcschememanagement.plist
├── warCardGame
├── AppDelegate.swift
├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Background.imageset
│ │ ├── Background.jpg
│ │ ├── Background@2x.jpg
│ │ ├── Background@3x.jpg
│ │ └── Contents.json
│ ├── Contents.json
│ ├── back.imageset
│ │ ├── Contents.json
│ │ ├── back.png
│ │ ├── back@2x.png
│ │ └── back@3x.png
│ ├── card10.imageset
│ │ ├── Contents.json
│ │ ├── card10.png
│ │ ├── card10@2x.png
│ │ └── card10@3x.png
│ ├── card11.imageset
│ │ ├── Contents.json
│ │ ├── card11.png
│ │ ├── card11@2x.png
│ │ └── card11@3x.png
│ ├── card12.imageset
│ │ ├── Contents.json
│ │ ├── card12.png
│ │ ├── card12@2x.png
│ │ └── card12@3x.png
│ ├── card13.imageset
│ │ ├── Contents.json
│ │ ├── card13.png
│ │ ├── card13@2x.png
│ │ └── card13@3x.png
│ ├── card14.imageset
│ │ ├── Contents.json
│ │ ├── card14.png
│ │ ├── card14@2x.png
│ │ └── card14@3x.png
│ ├── card2.imageset
│ │ ├── Contents.json
│ │ ├── card2.png
│ │ ├── card2@2x.png
│ │ └── card2@3x.png
│ ├── card3.imageset
│ │ ├── Contents.json
│ │ ├── card3.png
│ │ ├── card3@2x.png
│ │ └── card3@3x.png
│ ├── card4.imageset
│ │ ├── Contents.json
│ │ ├── card4.png
│ │ ├── card4@2x.png
│ │ └── card4@3x.png
│ ├── card5.imageset
│ │ ├── Contents.json
│ │ ├── card5.png
│ │ ├── card5@2x.png
│ │ └── card5@3x.png
│ ├── card6.imageset
│ │ ├── Contents.json
│ │ ├── card6.png
│ │ ├── card6@2x.png
│ │ └── card6@3x.png
│ ├── card7.imageset
│ │ ├── Contents.json
│ │ ├── card7.png
│ │ ├── card7@2x.png
│ │ └── card7@3x.png
│ ├── card8.imageset
│ │ ├── Contents.json
│ │ ├── card8.png
│ │ ├── card8@2x.png
│ │ └── card8@3x.png
│ ├── card9.imageset
│ │ ├── Contents.json
│ │ ├── card9.png
│ │ ├── card9@2x.png
│ │ └── card9@3x.png
│ ├── dealbutton.imageset
│ │ ├── Contents.json
│ │ ├── dealbutton.png
│ │ ├── dealbutton@2x.png
│ │ └── dealbutton@3x.png
│ └── logo.imageset
│ │ ├── Contents.json
│ │ ├── logo.png
│ │ ├── logo@2x.png
│ │ └── logo@3x.png
├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
├── Info.plist
├── SceneDelegate.swift
└── ViewController.swift
├── warCardGameTests
├── Info.plist
└── warCardGameTests.swift
└── warCardGameUITests
├── Info.plist
└── warCardGameUITests.swift
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/.DS_Store
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | #amplify
2 | amplify/\#current-cloud-backend
3 | amplify/.config/local-*
4 | amplify/logs
5 | amplify/mock-data
6 | amplify/backend/amplify-meta.json
7 | amplify/backend/awscloudformation
8 | amplify/backend/.temp
9 | build/
10 | dist/
11 | Pods/
12 | node_modules/
13 | aws-exports.js
14 | awsconfiguration.json
15 | amplifyconfiguration.json
16 | amplify-build-config.json
17 | amplify-gradle-config.json
18 | amplifytools.xcconfig
19 | .secret-*
20 |
--------------------------------------------------------------------------------
/NotificationDelegate/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/NotificationDelegate/.DS_Store
--------------------------------------------------------------------------------
/NotificationDelegate/NotificationDelegate.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/NotificationDelegate/NotificationDelegate.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/NotificationDelegate/NotificationDelegate.xcodeproj/project.xcworkspace/xcuserdata/peterlamar.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/NotificationDelegate/NotificationDelegate.xcodeproj/project.xcworkspace/xcuserdata/peterlamar.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/NotificationDelegate/NotificationDelegate.xcodeproj/xcuserdata/peterlamar.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | NotificationDelegate.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/NotificationDelegate/NotificationDelegate/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/NotificationDelegate/NotificationDelegate/Preview Content/Preview Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/NotificationDelegate/NotificationDelegateTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/NotificationDelegate/NotificationDelegateTests/NotificationDelegateTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // NotificationDelegateTests.swift
3 | // NotificationDelegateTests
4 | //
5 | // Created by Peter Lamar on 2/14/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 |
9 | @testable import NotificationDelegate
10 | import XCTest
11 |
12 | class NotificationDelegateTests: XCTestCase {
13 | override func setUp() {
14 | // Put setup code here. This method is called before the invocation of each test method in the class.
15 | }
16 |
17 | override func tearDown() {
18 | // Put teardown code here. This method is called after the invocation of each test method in the class.
19 | }
20 |
21 | func testExample() {
22 | // This is an example of a functional test case.
23 | // Use XCTAssert and related functions to verify your tests produce the correct results.
24 | }
25 |
26 | func testPerformanceExample() {
27 | // This is an example of a performance test case.
28 | measure {
29 | // Put the code you want to measure the time of here.
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/NotificationDelegate/NotificationDelegateUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/NotificationDelegate/README.md:
--------------------------------------------------------------------------------
1 | # NotificaitonDelegate
2 |
3 | Pieced together from the following tutorials:
4 |
5 | [UIKit](https://github.com/ilkayaktas/NotificationExperiment)
6 |
7 | [Foreground Notifications](https://medium.com/flawless-app-stories/local-notifications-in-swift-5-and-ios-13-with-unusernotificationcenter-190e654a5615)
8 |
--------------------------------------------------------------------------------
/UIKitBasics/UIKitBasics.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/UIKitBasics/UIKitBasics.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/UIKitBasics/UIKitBasics.xcodeproj/project.xcworkspace/xcuserdata/peterlamar.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/UIKitBasics/UIKitBasics.xcodeproj/project.xcworkspace/xcuserdata/peterlamar.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/UIKitBasics/UIKitBasics.xcodeproj/xcuserdata/peterlamar.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | UIKitBasics.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/UIKitBasics/UIKitBasics/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // UIKitBasics
4 | //
5 | // Created by Peter Lamar on 2/20/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 | func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
14 | // Override point for customization after application launch.
15 | return true
16 | }
17 |
18 | // MARK: UISceneSession Lifecycle
19 |
20 | func application(_: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options _: UIScene.ConnectionOptions) -> UISceneConfiguration {
21 | // Called when a new scene session is being created.
22 | // Use this method to select a configuration to create the new scene with.
23 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
24 | }
25 |
26 | func application(_: UIApplication, didDiscardSceneSessions _: Set) {
27 | // Called when the user discards a scene session.
28 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
29 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/UIKitBasics/UIKitBasics/Assets.xcassets/Background.imageset/Background.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/UIKitBasics/UIKitBasics/Assets.xcassets/Background.imageset/Background.jpg
--------------------------------------------------------------------------------
/UIKitBasics/UIKitBasics/Assets.xcassets/Background.imageset/Background@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/UIKitBasics/UIKitBasics/Assets.xcassets/Background.imageset/Background@2x.jpg
--------------------------------------------------------------------------------
/UIKitBasics/UIKitBasics/Assets.xcassets/Background.imageset/Background@3x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/UIKitBasics/UIKitBasics/Assets.xcassets/Background.imageset/Background@3x.jpg
--------------------------------------------------------------------------------
/UIKitBasics/UIKitBasics/Assets.xcassets/Background.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "Background.jpg",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "Background@2x.jpg",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "Background@3x.jpg",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/UIKitBasics/UIKitBasics/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/UIKitBasics/UIKitBasics/Assets.xcassets/Email.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "Email.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "Email@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "Email@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/UIKitBasics/UIKitBasics/Assets.xcassets/Email.imageset/Email.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/UIKitBasics/UIKitBasics/Assets.xcassets/Email.imageset/Email.png
--------------------------------------------------------------------------------
/UIKitBasics/UIKitBasics/Assets.xcassets/Email.imageset/Email@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/UIKitBasics/UIKitBasics/Assets.xcassets/Email.imageset/Email@2x.png
--------------------------------------------------------------------------------
/UIKitBasics/UIKitBasics/Assets.xcassets/Email.imageset/Email@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/UIKitBasics/UIKitBasics/Assets.xcassets/Email.imageset/Email@3x.png
--------------------------------------------------------------------------------
/UIKitBasics/UIKitBasics/Assets.xcassets/FB.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "FB.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "FB@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "FB@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/UIKitBasics/UIKitBasics/Assets.xcassets/FB.imageset/FB.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/UIKitBasics/UIKitBasics/Assets.xcassets/FB.imageset/FB.png
--------------------------------------------------------------------------------
/UIKitBasics/UIKitBasics/Assets.xcassets/FB.imageset/FB@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/UIKitBasics/UIKitBasics/Assets.xcassets/FB.imageset/FB@2x.png
--------------------------------------------------------------------------------
/UIKitBasics/UIKitBasics/Assets.xcassets/FB.imageset/FB@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/UIKitBasics/UIKitBasics/Assets.xcassets/FB.imageset/FB@3x.png
--------------------------------------------------------------------------------
/UIKitBasics/UIKitBasics/Assets.xcassets/Google.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "Google.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "Google@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "Google@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/UIKitBasics/UIKitBasics/Assets.xcassets/Google.imageset/Google.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/UIKitBasics/UIKitBasics/Assets.xcassets/Google.imageset/Google.png
--------------------------------------------------------------------------------
/UIKitBasics/UIKitBasics/Assets.xcassets/Google.imageset/Google@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/UIKitBasics/UIKitBasics/Assets.xcassets/Google.imageset/Google@2x.png
--------------------------------------------------------------------------------
/UIKitBasics/UIKitBasics/Assets.xcassets/Google.imageset/Google@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/UIKitBasics/UIKitBasics/Assets.xcassets/Google.imageset/Google@3x.png
--------------------------------------------------------------------------------
/UIKitBasics/UIKitBasics/README.md:
--------------------------------------------------------------------------------
1 | # UIKit Basics
2 |
3 | Since SwiftUI isn't fully baked yet, one must be capable with UIKit as well.
4 |
5 | Tutorial followed [here](https://www.youtube.com/watch?v=jniJeamcIUU)
6 |
--------------------------------------------------------------------------------
/UIKitBasics/UIKitBasics/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // UIKitBasics
4 | //
5 | // Created by Peter Lamar on 2/20/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 | override func viewDidLoad() {
13 | super.viewDidLoad()
14 | // Do any additional setup after loading the view.
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/UIKitBasics/UIKitBasicsTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/UIKitBasics/UIKitBasicsTests/UIKitBasicsTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIKitBasicsTests.swift
3 | // UIKitBasicsTests
4 | //
5 | // Created by Peter Lamar on 2/20/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 |
9 | @testable import UIKitBasics
10 | import XCTest
11 |
12 | class UIKitBasicsTests: XCTestCase {
13 | override func setUp() {
14 | // Put setup code here. This method is called before the invocation of each test method in the class.
15 | }
16 |
17 | override func tearDown() {
18 | // Put teardown code here. This method is called after the invocation of each test method in the class.
19 | }
20 |
21 | func testExample() {
22 | // This is an example of a functional test case.
23 | // Use XCTAssert and related functions to verify your tests produce the correct results.
24 | }
25 |
26 | func testPerformanceExample() {
27 | // This is an example of a performance test case.
28 | measure {
29 | // Put the code you want to measure the time of here.
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/UIKitBasics/UIKitBasicsUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/UIKitBasics/UIKitBasicsUITests/UIKitBasicsUITests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIKitBasicsUITests.swift
3 | // UIKitBasicsUITests
4 | //
5 | // Created by Peter Lamar on 2/20/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 |
9 | import XCTest
10 |
11 | class UIKitBasicsUITests: XCTestCase {
12 | override func setUp() {
13 | // Put setup code here. This method is called before the invocation of each test method in the class.
14 |
15 | // In UI tests it is usually best to stop immediately when a failure occurs.
16 | continueAfterFailure = false
17 |
18 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
19 | }
20 |
21 | override func tearDown() {
22 | // Put teardown code here. This method is called after the invocation of each test method in the class.
23 | }
24 |
25 | func testExample() {
26 | // UI tests must launch the application that they test.
27 | let app = XCUIApplication()
28 | app.launch()
29 |
30 | // Use recording to get started writing UI tests.
31 | // Use XCTAssert and related functions to verify your tests produce the correct results.
32 | }
33 |
34 | func testLaunchPerformance() {
35 | if #available(macOS 10.15, iOS 13.0, tvOS 13.0, *) {
36 | // This measures how long it takes to launch your application.
37 | measure(metrics: [XCTOSSignpostMetric.applicationLaunch]) {
38 | XCUIApplication().launch()
39 | }
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/UIKitNotification/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/UIKitNotification/.DS_Store
--------------------------------------------------------------------------------
/UIKitNotification/NtnExl/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleDisplayName
8 | NtnExl
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleVersion
22 | 1
23 | NSExtension
24 |
25 | NSExtensionAttributes
26 |
27 | UNNotificationExtensionDefaultContentHidden
28 |
29 | UNNotificationExtensionUserInteractionEnabled
30 |
31 | UNNotificationExtensionCategory
32 | myNotificationCategory
33 | UNNotificationExtensionInitialContentSizeRatio
34 | 1
35 |
36 | NSExtensionMainStoryboard
37 | MainInterface
38 | NSExtensionPointIdentifier
39 | com.apple.usernotifications.content-extension
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/UIKitNotification/NtnExl/NotificationViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // NotificationViewController.swift
3 | // NtnExl
4 | //
5 | // Created by Peter Lamar on 2/27/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import UserNotifications
11 | import UserNotificationsUI
12 |
13 | class NotificationViewController: UIViewController, UNNotificationContentExtension {
14 | @IBOutlet var SubLabel: UILabel!
15 |
16 | override func viewDidLoad() {
17 | super.viewDidLoad()
18 | // Do any required interface initialization here.
19 | }
20 |
21 | // Init
22 | func didReceive(_: UNNotification) {
23 | SubLabel?.text = "Short impressive subtitle"
24 | }
25 |
26 | // This runs when button is pressed
27 | func didReceive(_ response: UNNotificationResponse, completionHandler _:
28 | (UNNotificationContentExtensionResponseOption) -> Void) {
29 | print("code ran")
30 |
31 | guard let currentActions = extensionContext?.notificationActions else { return }
32 |
33 | if response.actionIdentifier == "yes-action" {
34 | print("All your money are belong to us")
35 | }
36 | if response.actionIdentifier == "no-action" {
37 | print("Resistence is futile")
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/UIKitNotification/UIKitNotification.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/UIKitNotification/UIKitNotification.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/UIKitNotification/UIKitNotification.xcodeproj/project.xcworkspace/xcuserdata/peterlamar.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/UIKitNotification/UIKitNotification.xcodeproj/project.xcworkspace/xcuserdata/peterlamar.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/UIKitNotification/UIKitNotification.xcodeproj/xcuserdata/peterlamar.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
--------------------------------------------------------------------------------
/UIKitNotification/UIKitNotification.xcodeproj/xcuserdata/peterlamar.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | NtnExl.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 1
11 |
12 | UIKitNotification.xcscheme_^#shared#^_
13 |
14 | orderHint
15 | 0
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/UIKitNotification/UIKitNotification/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/UIKitNotification/UIKitNotification/Preview Content/Preview Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/UIKitNotification/UIKitNotificationTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/UIKitNotification/UIKitNotificationTests/UIKitNotificationTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIKitNotificationTests.swift
3 | // UIKitNotificationTests
4 | //
5 | // Created by Peter Lamar on 2/27/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 |
9 | @testable import UIKitNotification
10 | import XCTest
11 |
12 | class UIKitNotificationTests: XCTestCase {
13 | override func setUp() {
14 | // Put setup code here. This method is called before the invocation of each test method in the class.
15 | }
16 |
17 | override func tearDown() {
18 | // Put teardown code here. This method is called after the invocation of each test method in the class.
19 | }
20 |
21 | func testExample() {
22 | // This is an example of a functional test case.
23 | // Use XCTAssert and related functions to verify your tests produce the correct results.
24 | }
25 |
26 | func testPerformanceExample() {
27 | // This is an example of a performance test case.
28 | measure {
29 | // Put the code you want to measure the time of here.
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/UIKitNotification/UIKitNotificationUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/animatedButtons/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/animatedButtons/.DS_Store
--------------------------------------------------------------------------------
/animatedButtons/animatedButtons.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/animatedButtons/animatedButtons.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/animatedButtons/animatedButtons.xcodeproj/project.xcworkspace/xcuserdata/peterlamar.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/animatedButtons/animatedButtons.xcodeproj/project.xcworkspace/xcuserdata/peterlamar.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/animatedButtons/animatedButtons.xcodeproj/xcuserdata/peterlamar.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | animatedButtons.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/animatedButtons/animatedButtons/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // animatedButtons
4 | //
5 | // Created by Peter Lamar on 4/28/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 | func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
14 | // Override point for customization after application launch.
15 | return true
16 | }
17 |
18 | // MARK: UISceneSession Lifecycle
19 |
20 | func application(_: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options _: UIScene.ConnectionOptions) -> UISceneConfiguration {
21 | // Called when a new scene session is being created.
22 | // Use this method to select a configuration to create the new scene with.
23 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
24 | }
25 |
26 | func application(_: UIApplication, didDiscardSceneSessions _: Set) {
27 | // Called when the user discards a scene session.
28 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
29 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/animatedButtons/animatedButtons/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/animatedButtons/animatedButtons/Preview Content/Preview Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/animatedButtons/animatedButtonsTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/animatedButtons/animatedButtonsTests/animatedButtonsTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // animatedButtonsTests.swift
3 | // animatedButtonsTests
4 | //
5 | // Created by Peter Lamar on 4/28/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 |
9 | @testable import animatedButtons
10 | import XCTest
11 |
12 | class animatedButtonsTests: XCTestCase {
13 | override func setUpWithError() throws {
14 | // Put setup code here. This method is called before the invocation of each test method in the class.
15 | }
16 |
17 | override func tearDownWithError() throws {
18 | // Put teardown code here. This method is called after the invocation of each test method in the class.
19 | }
20 |
21 | func testExample() throws {
22 | // This is an example of a functional test case.
23 | // Use XCTAssert and related functions to verify your tests produce the correct results.
24 | }
25 |
26 | func testPerformanceExample() throws {
27 | // This is an example of a performance test case.
28 | measure {
29 | // Put the code you want to measure the time of here.
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/animatedButtons/animatedButtonsUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/animatedButtons/normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/animatedButtons/normal.png
--------------------------------------------------------------------------------
/animatedButtons/pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/animatedButtons/pressed.png
--------------------------------------------------------------------------------
/animatedButtons/readme.md:
--------------------------------------------------------------------------------
1 | # Animated Buttons
2 |
3 | Basic example showing buttons with a scale effect on press as well as buttonstyle to apply to multiple buttons.
4 |
5 | 
6 | 
7 |
8 |
9 | Based on [tutorial](https://www.appcoda.com/swiftui-button-style-animation/), but updated to work for XCode 11.4.1
10 |
--------------------------------------------------------------------------------
/awsTodo/.gitignore:
--------------------------------------------------------------------------------
1 | #amplify
2 | amplify/\#current-cloud-backend
3 | amplify/.config/local-*
4 | amplify/logs
5 | amplify/mock-data
6 | amplify/backend/amplify-meta.json
7 | amplify/backend/awscloudformation
8 | amplify/backend/.temp
9 | build/
10 | dist/
11 | Pods/
12 | node_modules/
13 | aws-exports.js
14 | awsconfiguration.json
15 | amplifyconfiguration.json
16 | amplify-build-config.json
17 | amplify-gradle-config.json
18 | amplifytools.xcconfig
19 | .secret-*
20 |
--------------------------------------------------------------------------------
/awsTodo/.graphqlconfig.yml:
--------------------------------------------------------------------------------
1 | projects:
2 | amplifyDatasource:
3 | schemaPath: graphql/schema.json
4 | includes:
5 | - graphql/**/*.graphql
6 | excludes:
7 | - ./amplify/**
8 | extensions:
9 | amplify:
10 | codeGenTarget: swift
11 | generatedFileName: API.swift
12 | docsFilePath: graphql
13 |
--------------------------------------------------------------------------------
/awsTodo/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment the next line to define a global platform for your project
2 |
3 | # platform :ios, '9.0'
4 |
5 | target 'awsTodo (iOS)' do
6 | # Comment the next line if you don't want to use dynamic frameworks
7 | use_frameworks!
8 |
9 | pod 'Amplify'
10 | pod 'AmplifyPlugins/AWSAPIPlugin'
11 | pod 'AmplifyPlugins/AWSDataStorePlugin'
12 | # Pods for awsTodo (iOS)
13 |
14 | end
15 |
16 | target 'awsTodo (macOS)' do
17 | # Comment the next line if you don't want to use dynamic frameworks
18 | use_frameworks!
19 |
20 | # Pods for awsTodo (macOS)
21 |
22 | end
23 |
--------------------------------------------------------------------------------
/awsTodo/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - Amplify (1.6.1):
3 | - Amplify/Default (= 1.6.1)
4 | - Amplify/Default (1.6.1)
5 | - AmplifyPlugins/AWSAPIPlugin (1.6.1):
6 | - AppSyncRealTimeClient (~> 1.4.0)
7 | - AWSCore (~> 2.23.0)
8 | - AWSPluginsCore (= 1.6.1)
9 | - AmplifyPlugins/AWSDataStorePlugin (1.6.1):
10 | - AWSCore (~> 2.23.0)
11 | - AWSPluginsCore (= 1.6.1)
12 | - SQLite.swift (~> 0.12.0)
13 | - AppSyncRealTimeClient (1.4.3):
14 | - Starscream (~> 3.1.0)
15 | - AWSCore (2.23.0)
16 | - AWSPluginsCore (1.6.1):
17 | - Amplify (= 1.6.1)
18 | - AWSCore (~> 2.23.0)
19 | - SQLite.swift (0.12.2):
20 | - SQLite.swift/standard (= 0.12.2)
21 | - SQLite.swift/standard (0.12.2)
22 | - Starscream (3.1.1)
23 |
24 | DEPENDENCIES:
25 | - Amplify
26 | - AmplifyPlugins/AWSAPIPlugin
27 | - AmplifyPlugins/AWSDataStorePlugin
28 |
29 | SPEC REPOS:
30 | trunk:
31 | - Amplify
32 | - AmplifyPlugins
33 | - AppSyncRealTimeClient
34 | - AWSCore
35 | - AWSPluginsCore
36 | - SQLite.swift
37 | - Starscream
38 |
39 | SPEC CHECKSUMS:
40 | Amplify: 4d0c3b0871e1f268c81ce5e9b65532df0a013900
41 | AmplifyPlugins: 51dfaeafe662cd571c4d4dfd3bdc5987fef2d5a7
42 | AppSyncRealTimeClient: 04df4dffe57cfbd06da336d0bfcd5641ba9adcb5
43 | AWSCore: 589ad0bd5b72e9a95ce33834f12339b50cfc9f14
44 | AWSPluginsCore: f41f8a478fe3fd8839ec16278b86dededefb0628
45 | SQLite.swift: d2b4642190917051ce6bd1d49aab565fe794eea3
46 | Starscream: 4bb2f9942274833f7b4d296a55504dcfc7edb7b0
47 |
48 | PODFILE CHECKSUM: 60808f1b8c29451a62d1436b541d66aee8bef7b0
49 |
50 | COCOAPODS: 1.10.1
51 |
--------------------------------------------------------------------------------
/awsTodo/Shared/.gitignore:
--------------------------------------------------------------------------------
1 | #amplify
2 | amplify/\#current-cloud-backend
3 | amplify/.config/local-*
4 | amplify/logs
5 | amplify/mock-data
6 | amplify/backend/amplify-meta.json
7 | amplify/backend/awscloudformation
8 | amplify/backend/.temp
9 | build/
10 | dist/
11 | node_modules/
12 | aws-exports.js
13 | awsconfiguration.json
14 | amplifyconfiguration.json
15 | amplify-build-config.json
16 | amplify-gradle-config.json
17 | amplifytools.xcconfig
18 | .secret-*
--------------------------------------------------------------------------------
/awsTodo/Shared/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/awsTodo/Shared/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/awsTodo/Shared/amplify/.config/project-config.json:
--------------------------------------------------------------------------------
1 | {
2 | "projectName": "awsTodo",
3 | "version": "3.0",
4 | "frontend": "ios",
5 | "providers": [
6 | "awscloudformation"
7 | ]
8 | }
--------------------------------------------------------------------------------
/awsTodo/Shared/amplify/README.md:
--------------------------------------------------------------------------------
1 | # Getting Started with Amplify CLI
2 | This directory was generated by [Amplify CLI](https://docs.amplify.aws/cli).
3 |
4 | Helpful resources:
5 | - Amplify documentation: https://docs.amplify.aws
6 | - Amplify CLI documentation: https://docs.amplify.aws/cli
7 | - More details on this folder & generated files: https://docs.amplify.aws/cli/reference/files
8 | - Join Amplify's community: https://amplify.aws/community/
9 |
--------------------------------------------------------------------------------
/awsTodo/Shared/amplify/backend/backend-config.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/awsTodo/Shared/amplify/backend/tags.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "Key": "user:Stack",
4 | "Value": "{project-env}"
5 | },
6 | {
7 | "Key": "user:Application",
8 | "Value": "{project-name}"
9 | }
10 | ]
--------------------------------------------------------------------------------
/awsTodo/Shared/amplify/team-provider-info.json:
--------------------------------------------------------------------------------
1 | {
2 | "dev": {
3 | "awscloudformation": {
4 | "AuthRoleName": "amplify-awstodo-dev-93013-authRole",
5 | "UnauthRoleArn": "arn:aws:iam::105366757604:role/amplify-awstodo-dev-93013-unauthRole",
6 | "AuthRoleArn": "arn:aws:iam::105366757604:role/amplify-awstodo-dev-93013-authRole",
7 | "Region": "us-east-2",
8 | "DeploymentBucketName": "amplify-awstodo-dev-93013-deployment",
9 | "UnauthRoleName": "amplify-awstodo-dev-93013-unauthRole",
10 | "StackName": "amplify-awstodo-dev-93013",
11 | "StackId": "arn:aws:cloudformation:us-east-2:105366757604:stack/amplify-awstodo-dev-93013/a400a4f0-7a9a-11eb-a4dc-069061106e60",
12 | "AmplifyAppId": "d2mvsse2mqbv6m"
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/awsTodo/Shared/awsTodoApp.swift:
--------------------------------------------------------------------------------
1 | //
2 | // awsTodoApp.swift
3 | // Shared
4 | //
5 | // Created by Peter Lamar on 2/28/21.
6 | //
7 |
8 | import SwiftUI
9 | import Amplify
10 | import AmplifyPlugins
11 |
12 | func configureAmplify() {
13 | let models = AmplifyModels()
14 | let apiPlugin = AWSAPIPlugin(modelRegistration: models)
15 | let dataStorePlugin = AWSDataStorePlugin(modelRegistration: models)
16 | do {
17 | try Amplify.add(plugin: apiPlugin)
18 | try Amplify.add(plugin: dataStorePlugin)
19 | try Amplify.configure()
20 | print("Initialized Amplify")
21 | } catch {
22 | print("Could not initialize Amplify: \(error)")
23 | }
24 | }
25 |
26 | @main
27 | struct awsTodoApp: App {
28 | public init() {
29 | configureAmplify()
30 | }
31 | var body: some Scene {
32 | WindowGroup {
33 | ContentView()
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/awsTodo/amplify/.config/project-config.json:
--------------------------------------------------------------------------------
1 | {
2 | "projectName": "awsTodo",
3 | "version": "3.0",
4 | "frontend": "ios",
5 | "providers": [
6 | "awscloudformation"
7 | ]
8 | }
--------------------------------------------------------------------------------
/awsTodo/amplify/README.md:
--------------------------------------------------------------------------------
1 | # Getting Started with Amplify CLI
2 | This directory was generated by [Amplify CLI](https://docs.amplify.aws/cli).
3 |
4 | Helpful resources:
5 | - Amplify documentation: https://docs.amplify.aws
6 | - Amplify CLI documentation: https://docs.amplify.aws/cli
7 | - More details on this folder & generated files: https://docs.amplify.aws/cli/reference/files
8 | - Join Amplify's community: https://amplify.aws/community/
9 |
--------------------------------------------------------------------------------
/awsTodo/amplify/backend/api/amplifyDatasource/parameters.json:
--------------------------------------------------------------------------------
1 | {
2 | "AppSyncApiName": "amplifyDatasource",
3 | "DynamoDBBillingMode": "PAY_PER_REQUEST",
4 | "DynamoDBEnableServerSideEncryption": "false"
5 | }
--------------------------------------------------------------------------------
/awsTodo/amplify/backend/api/amplifyDatasource/schema.graphql:
--------------------------------------------------------------------------------
1 | enum Priority {
2 | LOW
3 | NORMAL
4 | HIGH
5 | }
6 |
7 | type Todo @model {
8 | id: ID!
9 | name: String!
10 | priority: Priority
11 | description: String
12 | }
13 |
--------------------------------------------------------------------------------
/awsTodo/amplify/backend/api/amplifyDatasource/transform.conf.json:
--------------------------------------------------------------------------------
1 | {
2 | "Version": 5,
3 | "ResolverConfig": {
4 | "project": {
5 | "ConflictHandler": "AUTOMERGE",
6 | "ConflictDetection": "VERSION"
7 | }
8 | },
9 | "ElasticsearchWarning": true
10 | }
--------------------------------------------------------------------------------
/awsTodo/amplify/backend/backend-config.json:
--------------------------------------------------------------------------------
1 | {
2 | "api": {
3 | "amplifyDatasource": {
4 | "service": "AppSync",
5 | "providerPlugin": "awscloudformation",
6 | "output": {
7 | "authConfig": {
8 | "additionalAuthenticationProviders": [],
9 | "defaultAuthentication": {
10 | "authenticationType": "API_KEY",
11 | "apiKeyConfig": {
12 | "description": "",
13 | "apiKeyExpirationDays": 7
14 | }
15 | }
16 | }
17 | }
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/awsTodo/amplify/cli.json:
--------------------------------------------------------------------------------
1 | {
2 | "features": {
3 | "graphqltransformer": {
4 | "addmissingownerfields": true,
5 | "validatetypenamereservedwords": true,
6 | "useexperimentalpipelinedtransformer": false,
7 | "enableiterativegsiupdates": false,
8 | "secondarykeyasgsi": true
9 | },
10 | "frontend-ios": {
11 | "enablexcodeintegration": true
12 | },
13 | "auth": {
14 | "enablecaseinsensitivity": true
15 | },
16 | "codegen": {
17 | "useappsyncmodelgenplugin": true,
18 | "usedocsgeneratorplugin": true,
19 | "usetypesgeneratorplugin": true
20 | },
21 | "appsync": {
22 | "generategraphqlpermissions": true
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/awsTodo/amplify/generated/models/AmplifyModels.swift:
--------------------------------------------------------------------------------
1 | // swiftlint:disable all
2 | import Amplify
3 | import Foundation
4 |
5 | // Contains the set of classes that conforms to the `Model` protocol.
6 |
7 | final public class AmplifyModels: AmplifyModelRegistration {
8 | public let version: String = "c9fdf4f8aca41eb2dc5c659dd70707bc"
9 |
10 | public func registerModels(registry: ModelRegistry.Type) {
11 | ModelRegistry.register(modelType: Todo.self)
12 | }
13 | }
--------------------------------------------------------------------------------
/awsTodo/amplify/generated/models/Priority.swift:
--------------------------------------------------------------------------------
1 | // swiftlint:disable all
2 | import Amplify
3 | import Foundation
4 |
5 | public enum Priority: String, EnumPersistable {
6 | case low = "LOW"
7 | case normal = "NORMAL"
8 | case high = "HIGH"
9 | }
--------------------------------------------------------------------------------
/awsTodo/amplify/generated/models/Todo+Schema.swift:
--------------------------------------------------------------------------------
1 | // swiftlint:disable all
2 | import Amplify
3 | import Foundation
4 |
5 | extension Todo {
6 | // MARK: - CodingKeys
7 | public enum CodingKeys: String, ModelKey {
8 | case id
9 | case name
10 | case priority
11 | case description
12 | }
13 |
14 | public static let keys = CodingKeys.self
15 | // MARK: - ModelSchema
16 |
17 | public static let schema = defineSchema { model in
18 | let todo = Todo.keys
19 |
20 | model.pluralName = "Todos"
21 |
22 | model.fields(
23 | .id(),
24 | .field(todo.name, is: .required, ofType: .string),
25 | .field(todo.priority, is: .optional, ofType: .enum(type: Priority.self)),
26 | .field(todo.description, is: .optional, ofType: .string)
27 | )
28 | }
29 | }
--------------------------------------------------------------------------------
/awsTodo/amplify/generated/models/Todo.swift:
--------------------------------------------------------------------------------
1 | // swiftlint:disable all
2 | import Amplify
3 | import Foundation
4 |
5 | public struct Todo: Model {
6 | public let id: String
7 | public var name: String
8 | public var priority: Priority?
9 | public var description: String?
10 |
11 | public init(id: String = UUID().uuidString,
12 | name: String,
13 | priority: Priority? = nil,
14 | description: String? = nil) {
15 | self.id = id
16 | self.name = name
17 | self.priority = priority
18 | self.description = description
19 | }
20 | }
--------------------------------------------------------------------------------
/awsTodo/amplify/team-provider-info.json:
--------------------------------------------------------------------------------
1 | {
2 | "dev": {
3 | "awscloudformation": {
4 | "AuthRoleName": "amplify-awstodo-dev-100646-authRole",
5 | "UnauthRoleArn": "arn:aws:iam::105366757604:role/amplify-awstodo-dev-100646-unauthRole",
6 | "AuthRoleArn": "arn:aws:iam::105366757604:role/amplify-awstodo-dev-100646-authRole",
7 | "Region": "us-east-2",
8 | "DeploymentBucketName": "amplify-awstodo-dev-100646-deployment",
9 | "UnauthRoleName": "amplify-awstodo-dev-100646-unauthRole",
10 | "StackName": "amplify-awstodo-dev-100646",
11 | "StackId": "arn:aws:cloudformation:us-east-2:105366757604:stack/amplify-awstodo-dev-100646/bfb6d070-7a9f-11eb-aba2-0281aed4af26",
12 | "AmplifyAppId": "d35yb4qbzgfaq5"
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/awsTodo/awsTodo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/awsTodo/awsTodo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/awsTodo/awsTodo.xcodeproj/project.xcworkspace/xcuserdata/plamar.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/awsTodo/awsTodo.xcodeproj/project.xcworkspace/xcuserdata/plamar.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/awsTodo/awsTodo.xcodeproj/xcuserdata/plamar.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | awsTodo (iOS).xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 9
11 |
12 | awsTodo (macOS).xcscheme_^#shared#^_
13 |
14 | orderHint
15 | 10
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/awsTodo/awsTodo.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/awsTodo/awsTodo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/awsTodo/awsTodo.xcworkspace/xcuserdata/plamar.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/awsTodo/awsTodo.xcworkspace/xcuserdata/plamar.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/awsTodo/graphql/mutations.graphql:
--------------------------------------------------------------------------------
1 | # this is an auto generated file. This will be overwritten
2 | mutation CreateTodo(
3 | $input: CreateTodoInput!
4 | $condition: ModelTodoConditionInput
5 | ) {
6 | createTodo(input: $input, condition: $condition) {
7 | id
8 | name
9 | priority
10 | description
11 | _version
12 | _deleted
13 | _lastChangedAt
14 | createdAt
15 | updatedAt
16 | }
17 | }
18 | mutation UpdateTodo(
19 | $input: UpdateTodoInput!
20 | $condition: ModelTodoConditionInput
21 | ) {
22 | updateTodo(input: $input, condition: $condition) {
23 | id
24 | name
25 | priority
26 | description
27 | _version
28 | _deleted
29 | _lastChangedAt
30 | createdAt
31 | updatedAt
32 | }
33 | }
34 | mutation DeleteTodo(
35 | $input: DeleteTodoInput!
36 | $condition: ModelTodoConditionInput
37 | ) {
38 | deleteTodo(input: $input, condition: $condition) {
39 | id
40 | name
41 | priority
42 | description
43 | _version
44 | _deleted
45 | _lastChangedAt
46 | createdAt
47 | updatedAt
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/awsTodo/graphql/queries.graphql:
--------------------------------------------------------------------------------
1 | # this is an auto generated file. This will be overwritten
2 | query SyncTodos(
3 | $filter: ModelTodoFilterInput
4 | $limit: Int
5 | $nextToken: String
6 | $lastSync: AWSTimestamp
7 | ) {
8 | syncTodos(
9 | filter: $filter
10 | limit: $limit
11 | nextToken: $nextToken
12 | lastSync: $lastSync
13 | ) {
14 | items {
15 | id
16 | name
17 | priority
18 | description
19 | _version
20 | _deleted
21 | _lastChangedAt
22 | createdAt
23 | updatedAt
24 | }
25 | nextToken
26 | startedAt
27 | }
28 | }
29 | query GetTodo($id: ID!) {
30 | getTodo(id: $id) {
31 | id
32 | name
33 | priority
34 | description
35 | _version
36 | _deleted
37 | _lastChangedAt
38 | createdAt
39 | updatedAt
40 | }
41 | }
42 | query ListTodos(
43 | $filter: ModelTodoFilterInput
44 | $limit: Int
45 | $nextToken: String
46 | ) {
47 | listTodos(filter: $filter, limit: $limit, nextToken: $nextToken) {
48 | items {
49 | id
50 | name
51 | priority
52 | description
53 | _version
54 | _deleted
55 | _lastChangedAt
56 | createdAt
57 | updatedAt
58 | }
59 | nextToken
60 | startedAt
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/awsTodo/graphql/subscriptions.graphql:
--------------------------------------------------------------------------------
1 | # this is an auto generated file. This will be overwritten
2 | subscription OnCreateTodo {
3 | onCreateTodo {
4 | id
5 | name
6 | priority
7 | description
8 | _version
9 | _deleted
10 | _lastChangedAt
11 | createdAt
12 | updatedAt
13 | }
14 | }
15 | subscription OnUpdateTodo {
16 | onUpdateTodo {
17 | id
18 | name
19 | priority
20 | description
21 | _version
22 | _deleted
23 | _lastChangedAt
24 | createdAt
25 | updatedAt
26 | }
27 | }
28 | subscription OnDeleteTodo {
29 | onDeleteTodo {
30 | id
31 | name
32 | priority
33 | description
34 | _version
35 | _deleted
36 | _lastChangedAt
37 | createdAt
38 | updatedAt
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/awsTodo/macOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleVersion
22 | 1
23 | LSMinimumSystemVersion
24 | $(MACOSX_DEPLOYMENT_TARGET)
25 |
26 |
27 |
--------------------------------------------------------------------------------
/awsTodo/macOS/macOS.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.files.user-selected.read-only
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/awsTodo/readme.md:
--------------------------------------------------------------------------------
1 | # awsTodo
2 |
3 | [Tutorial](https://docs.amplify.aws/start/q/integration/ios)
4 |
--------------------------------------------------------------------------------
/buttonChangeText/README.md:
--------------------------------------------------------------------------------
1 | # Change Text from Button Press
2 |
3 | Change the state of a separate UI object from a button press
4 |
5 | [reference](https://medium.com/flawless-app-stories/swiftui-understanding-state-8afa23fd9f1f)
6 |
--------------------------------------------------------------------------------
/buttonChangeText/buttonChangeText.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/buttonChangeText/buttonChangeText.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/buttonChangeText/buttonChangeText.xcodeproj/project.xcworkspace/xcuserdata/peterlamar.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/buttonChangeText/buttonChangeText.xcodeproj/project.xcworkspace/xcuserdata/peterlamar.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/buttonChangeText/buttonChangeText.xcodeproj/xcuserdata/peterlamar.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | buttonChangeText.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/buttonChangeText/buttonChangeText/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // buttonChangeText
4 | //
5 | // Created by Peter Lamar on 3/23/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 | func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
14 | // Override point for customization after application launch.
15 | return true
16 | }
17 |
18 | // MARK: UISceneSession Lifecycle
19 |
20 | func application(_: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options _: UIScene.ConnectionOptions) -> UISceneConfiguration {
21 | // Called when a new scene session is being created.
22 | // Use this method to select a configuration to create the new scene with.
23 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
24 | }
25 |
26 | func application(_: UIApplication, didDiscardSceneSessions _: Set) {
27 | // Called when the user discards a scene session.
28 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
29 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/buttonChangeText/buttonChangeText/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/buttonChangeText/buttonChangeText/ContentView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ContentView.swift
3 | // buttonChangeText
4 | //
5 | // Created by Peter Lamar on 3/23/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 |
9 | import SwiftUI
10 | struct ContentView: View {
11 | @State var colors: [Color] = [Color.white, Color.white]
12 |
13 | var body: some View {
14 | HStack {
15 | Spacer()
16 |
17 | Button(
18 | action: { self.switchSelection(index: 0) },
19 | label: { Text("Pick Me") }
20 | ).background(colors[0])
21 | Spacer()
22 | Button(
23 | action: { self.switchSelection(index: 1) },
24 | label: { Text("No, Pick Me") }
25 | ).background(colors[1])
26 | Spacer()
27 | }
28 | }
29 |
30 | func switchSelection(index: Int) {
31 | if index == 0 {
32 | colors[0] = Color.orange
33 | colors[1] = Color.white
34 | } else if index == 1 {
35 | colors[0] = Color.white
36 | colors[1] = Color.orange
37 | }
38 | }
39 | }
40 |
41 | #if DEBUG
42 | struct ContentView_Previews: PreviewProvider {
43 | static var previews: some View {
44 | ContentView()
45 | }
46 | }
47 | #endif
48 |
--------------------------------------------------------------------------------
/buttonChangeText/buttonChangeText/Preview Content/Preview Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/buttonChangeText/buttonChangeTextTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/buttonChangeText/buttonChangeTextTests/buttonChangeTextTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // buttonChangeTextTests.swift
3 | // buttonChangeTextTests
4 | //
5 | // Created by Peter Lamar on 3/23/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 |
9 | @testable import buttonChangeText
10 | import XCTest
11 |
12 | class buttonChangeTextTests: XCTestCase {
13 | override func setUp() {
14 | // Put setup code here. This method is called before the invocation of each test method in the class.
15 | }
16 |
17 | override func tearDown() {
18 | // Put teardown code here. This method is called after the invocation of each test method in the class.
19 | }
20 |
21 | func testExample() {
22 | // This is an example of a functional test case.
23 | // Use XCTAssert and related functions to verify your tests produce the correct results.
24 | }
25 |
26 | func testPerformanceExample() {
27 | // This is an example of a performance test case.
28 | measure {
29 | // Put the code you want to measure the time of here.
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/buttonChangeText/buttonChangeTextUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/buttonStateChange/buttonStateChange.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/buttonStateChange/buttonStateChange.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/buttonStateChange/buttonStateChange.xcodeproj/project.xcworkspace/xcuserdata/peterlamar.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/buttonStateChange/buttonStateChange.xcodeproj/project.xcworkspace/xcuserdata/peterlamar.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/buttonStateChange/buttonStateChange.xcodeproj/xcuserdata/peterlamar.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | buttonStateChange.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/buttonStateChange/buttonStateChange/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // buttonStateChange
4 | //
5 | // Created by Peter Lamar on 3/19/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 | func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
14 | // Override point for customization after application launch.
15 | return true
16 | }
17 |
18 | // MARK: UISceneSession Lifecycle
19 |
20 | func application(_: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options _: UIScene.ConnectionOptions) -> UISceneConfiguration {
21 | // Called when a new scene session is being created.
22 | // Use this method to select a configuration to create the new scene with.
23 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
24 | }
25 |
26 | func application(_: UIApplication, didDiscardSceneSessions _: Set) {
27 | // Called when the user discards a scene session.
28 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
29 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/buttonStateChange/buttonStateChange/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/buttonStateChange/buttonStateChange/ContentView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ContentView.swift
3 | // buttonStateChange
4 | //
5 | // Created by Peter Lamar on 3/19/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 |
9 | import SwiftUI
10 |
11 | struct ContentView: View {
12 | @State var sColor = Color.black
13 |
14 | var body: some View {
15 | return VStack {
16 | Button("Tap Me!") {
17 | print("button pressed!")
18 | self.sColor = Color.red
19 |
20 | }.buttonStyle(MyButtonStyle(color: sColor))
21 | }
22 | }
23 | }
24 |
25 | struct MyButtonStyle: ButtonStyle {
26 | var color: Color
27 |
28 | public func makeBody(configuration: MyButtonStyle.Configuration) -> some View {
29 | print("inside button style")
30 | print(color)
31 |
32 | return configuration.label
33 | .foregroundColor(.white)
34 | .padding(15)
35 | .background(RoundedRectangle(cornerRadius: 5).fill(color))
36 | .compositingGroup()
37 | .shadow(color: .black, radius: 3)
38 | .opacity(configuration.isPressed ? 0.5 : 1.0)
39 | .scaleEffect(configuration.isPressed ? 0.8 : 1.0)
40 | }
41 | }
42 |
43 | struct ContentView_Previews: PreviewProvider {
44 | static var previews: some View {
45 | ContentView()
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/buttonStateChange/buttonStateChange/Preview Content/Preview Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/buttonStateChange/buttonStateChangeTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/buttonStateChange/buttonStateChangeTests/buttonStateChangeTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // buttonStateChangeTests.swift
3 | // buttonStateChangeTests
4 | //
5 | // Created by Peter Lamar on 3/19/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 |
9 | @testable import buttonStateChange
10 | import XCTest
11 |
12 | class buttonStateChangeTests: XCTestCase {
13 | override func setUp() {
14 | // Put setup code here. This method is called before the invocation of each test method in the class.
15 | }
16 |
17 | override func tearDown() {
18 | // Put teardown code here. This method is called after the invocation of each test method in the class.
19 | }
20 |
21 | func testExample() {
22 | // This is an example of a functional test case.
23 | // Use XCTAssert and related functions to verify your tests produce the correct results.
24 | }
25 |
26 | func testPerformanceExample() {
27 | // This is an example of a performance test case.
28 | measure {
29 | // Put the code you want to measure the time of here.
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/buttonStateChange/buttonStateChangeUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/coreDataRelationships/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/coreDataRelationships/.DS_Store
--------------------------------------------------------------------------------
/coreDataRelationships/README.md:
--------------------------------------------------------------------------------
1 | # coreDataRelationships
2 |
3 | This tutorial goes into coredata relationships and how they can be used to have member objects within coredata. It also gets it working within SwiftUI.
4 |
5 | [Tutorial](https://www.hackingwithswift.com/books/ios-swiftui/one-to-many-relationships-with-core-data-swiftui-and-fetchrequest)
6 |
7 | 
8 |
--------------------------------------------------------------------------------
/coreDataRelationships/coreDataRelationships.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/coreDataRelationships/coreDataRelationships.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/coreDataRelationships/coreDataRelationships.xcodeproj/project.xcworkspace/xcuserdata/peterlamar.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/coreDataRelationships/coreDataRelationships.xcodeproj/project.xcworkspace/xcuserdata/peterlamar.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/coreDataRelationships/coreDataRelationships.xcodeproj/xcuserdata/peterlamar.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | coreDataRelationships.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/coreDataRelationships/coreDataRelationships/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/coreDataRelationships/coreDataRelationships/Candy+CoreDataClass.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Candy+CoreDataClass.swift
3 | // coreDataRelationships
4 | //
5 | // Created by Peter Lamar on 5/28/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 | //
9 |
10 | import CoreData
11 | import Foundation
12 |
13 | @objc(Candy)
14 | public class Candy: NSManagedObject {}
15 |
--------------------------------------------------------------------------------
/coreDataRelationships/coreDataRelationships/Candy+CoreDataProperties.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Candy+CoreDataProperties.swift
3 | // coreDataRelationships
4 | //
5 | // Created by Peter Lamar on 5/28/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 | //
9 |
10 | import CoreData
11 | import Foundation
12 |
13 | extension Candy {
14 | @nonobjc public class func fetchRequest() -> NSFetchRequest {
15 | return NSFetchRequest(entityName: "Candy")
16 | }
17 |
18 | @NSManaged public var name: String?
19 | @NSManaged public var origin: Country?
20 |
21 | public var wrappedName: String {
22 | name ?? "Unknown Candy"
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/coreDataRelationships/coreDataRelationships/Country+CoreDataClass.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Country+CoreDataClass.swift
3 | // coreDataRelationships
4 | //
5 | // Created by Peter Lamar on 5/28/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 | //
9 |
10 | import CoreData
11 | import Foundation
12 |
13 | @objc(Country)
14 | public class Country: NSManagedObject {}
15 |
--------------------------------------------------------------------------------
/coreDataRelationships/coreDataRelationships/Country+CoreDataProperties.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Country+CoreDataProperties.swift
3 | // coreDataRelationships
4 | //
5 | // Created by Peter Lamar on 5/28/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 | //
9 |
10 | import CoreData
11 | import Foundation
12 |
13 | extension Country {
14 | @nonobjc public class func fetchRequest() -> NSFetchRequest {
15 | return NSFetchRequest(entityName: "Country")
16 | }
17 |
18 | @NSManaged public var fullName: String?
19 | @NSManaged public var shortName: String?
20 | @NSManaged public var candy: NSSet?
21 |
22 | public var wrappedShortName: String {
23 | shortName ?? "Unknown Country"
24 | }
25 |
26 | public var wrappedFullName: String {
27 | fullName ?? "Unknown Country"
28 | }
29 |
30 | public var candyArray: [Candy] {
31 | let set = candy as? Set ?? []
32 |
33 | return set.sorted {
34 | $0.wrappedName < $1.wrappedName
35 | }
36 | }
37 | }
38 |
39 | // MARK: Generated accessors for candy
40 |
41 | extension Country {
42 | @objc(addCandyObject:)
43 | @NSManaged public func addToCandy(_ value: Candy)
44 |
45 | @objc(removeCandyObject:)
46 | @NSManaged public func removeFromCandy(_ value: Candy)
47 |
48 | @objc(addCandy:)
49 | @NSManaged public func addToCandy(_ values: NSSet)
50 |
51 | @objc(removeCandy:)
52 | @NSManaged public func removeFromCandy(_ values: NSSet)
53 | }
54 |
--------------------------------------------------------------------------------
/coreDataRelationships/coreDataRelationships/Preview Content/Preview Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/coreDataRelationships/coreDataRelationships/coreDataRelationships.xcdatamodeld/.xccurrentversion:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | _XCCurrentVersionName
6 | coreDataRelationships.xcdatamodel
7 |
8 |
9 |
--------------------------------------------------------------------------------
/coreDataRelationships/coreDataRelationships/coreDataRelationships.xcdatamodeld/coreDataRelationships.xcdatamodel/contents:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/coreDataRelationships/coreDataRelationshipsTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/coreDataRelationships/coreDataRelationshipsTests/coreDataRelationshipsTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // coreDataRelationshipsTests.swift
3 | // coreDataRelationshipsTests
4 | //
5 | // Created by Peter Lamar on 5/28/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 |
9 | @testable import coreDataRelationships
10 | import XCTest
11 |
12 | class coreDataRelationshipsTests: XCTestCase {
13 | override func setUpWithError() throws {
14 | // Put setup code here. This method is called before the invocation of each test method in the class.
15 | }
16 |
17 | override func tearDownWithError() throws {
18 | // Put teardown code here. This method is called after the invocation of each test method in the class.
19 | }
20 |
21 | func testExample() throws {
22 | // This is an example of a functional test case.
23 | // Use XCTAssert and related functions to verify your tests produce the correct results.
24 | }
25 |
26 | func testPerformanceExample() throws {
27 | // This is an example of a performance test case.
28 | measure {
29 | // Put the code you want to measure the time of here.
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/coreDataRelationships/coreDataRelationshipsUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/coreDataRelationships/coredatarel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/coreDataRelationships/coredatarel.png
--------------------------------------------------------------------------------
/coredatasample/README.md:
--------------------------------------------------------------------------------
1 | # CoreDataSample
2 |
3 | [Online tutorial](https://www.hackingwithswift.com/books/ios-swiftui/how-to-combine-core-data-and-swiftui) which serves as intro to CoreData, mechanism for storing data.
4 |
5 | 
6 |
--------------------------------------------------------------------------------
/coredatasample/coredata.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/coredatasample/coredata.png
--------------------------------------------------------------------------------
/coredatasample/coredatasample.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/coredatasample/coredatasample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/coredatasample/coredatasample.xcodeproj/project.xcworkspace/xcuserdata/peterlamar.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/coredatasample/coredatasample.xcodeproj/project.xcworkspace/xcuserdata/peterlamar.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/coredatasample/coredatasample.xcodeproj/xcuserdata/peterlamar.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
9 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/coredatasample/coredatasample.xcodeproj/xcuserdata/peterlamar.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | coredatasample.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/coredatasample/coredatasample/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/coredatasample/coredatasample/ContentView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ContentView.swift
3 | // coredatasample
4 | //
5 | // Created by Peter Lamar on 5/20/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 |
9 | import SwiftUI
10 | import CoreData
11 |
12 | struct ContentView: View {
13 | @FetchRequest(entity: Student.entity(), sortDescriptors: []) var students: FetchedResults
14 | @Environment(\.managedObjectContext) var moc
15 |
16 | var body: some View {
17 | VStack {
18 |
19 | List {
20 | ForEach(students, id: \.id) { student in
21 | Text(student.name ?? "Unknown")
22 | }
23 | }
24 |
25 | Button("Add") {
26 | let firstNames = ["Ginny", "Harry", "Hermione", "Luna", "Ron"]
27 | let lastNames = ["Granger", "Lovegood", "Potter", "Weasley"]
28 |
29 | let chosenFirstName = firstNames.randomElement()!
30 | let chosenLastName = lastNames.randomElement()!
31 |
32 | let student = Student(context: self.moc)
33 | student.id = UUID()
34 | student.name = "\(chosenFirstName) \(chosenLastName)"
35 | try? self.moc.save()
36 | }
37 | }
38 | }
39 | }
40 |
41 | struct ContentView_Previews: PreviewProvider {
42 | static var previews: some View {
43 | ContentView()
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/coredatasample/coredatasample/Preview Content/Preview Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/coredatasample/coredatasample/coredatasample.xcdatamodeld/.xccurrentversion:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | _XCCurrentVersionName
6 | coredatasample.xcdatamodel
7 |
8 |
9 |
--------------------------------------------------------------------------------
/coredatasample/coredatasample/coredatasample.xcdatamodeld/coredatasample.xcdatamodel/contents:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/coredatasample/coredatasampleTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/coredatasample/coredatasampleTests/coredatasampleTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // coredatasampleTests.swift
3 | // coredatasampleTests
4 | //
5 | // Created by Peter Lamar on 5/20/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 |
9 | @testable import coredatasample
10 | import XCTest
11 |
12 | class coredatasampleTests: XCTestCase {
13 | override func setUpWithError() throws {
14 | // Put setup code here. This method is called before the invocation of each test method in the class.
15 | }
16 |
17 | override func tearDownWithError() throws {
18 | // Put teardown code here. This method is called after the invocation of each test method in the class.
19 | }
20 |
21 | func testExample() throws {
22 | // This is an example of a functional test case.
23 | // Use XCTAssert and related functions to verify your tests produce the correct results.
24 | }
25 |
26 | func testPerformanceExample() throws {
27 | // This is an example of a performance test case.
28 | measure {
29 | // Put the code you want to measure the time of here.
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/coredatasample/coredatasampleUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/exclusiveButtons/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/exclusiveButtons/.DS_Store
--------------------------------------------------------------------------------
/exclusiveButtons/exclusiveButtons.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/exclusiveButtons/exclusiveButtons.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/exclusiveButtons/exclusiveButtons.xcodeproj/project.xcworkspace/xcuserdata/peterlamar.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/exclusiveButtons/exclusiveButtons.xcodeproj/project.xcworkspace/xcuserdata/peterlamar.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/exclusiveButtons/exclusiveButtons.xcodeproj/xcuserdata/peterlamar.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | exclusiveButtons.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/exclusiveButtons/exclusiveButtons/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // exclusiveButtons
4 | //
5 | // Created by Peter Lamar on 3/23/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 | func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
14 | // Override point for customization after application launch.
15 | return true
16 | }
17 |
18 | // MARK: UISceneSession Lifecycle
19 |
20 | func application(_: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options _: UIScene.ConnectionOptions) -> UISceneConfiguration {
21 | // Called when a new scene session is being created.
22 | // Use this method to select a configuration to create the new scene with.
23 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
24 | }
25 |
26 | func application(_: UIApplication, didDiscardSceneSessions _: Set) {
27 | // Called when the user discards a scene session.
28 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
29 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/exclusiveButtons/exclusiveButtons/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/exclusiveButtons/exclusiveButtons/ContentView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ContentView.swift
3 | // exclusiveButtons
4 | //
5 | // Created by Peter Lamar on 3/23/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 |
9 | import SwiftUI
10 |
11 | struct ContentView: View {
12 | @State var colors: [Color] = [Color.white, Color.white]
13 |
14 | var body: some View {
15 | HStack {
16 | Spacer()
17 |
18 | Button(
19 | action: { self.switchSelection(index: 0) },
20 | label: { Text("Pick Me") }
21 | ).background(colors[0])
22 | Spacer()
23 | Button(
24 | action: { self.switchSelection(index: 1) },
25 | label: { Text("No, Pick Me") }
26 | ).background(colors[1])
27 | Spacer()
28 | }
29 | }
30 |
31 | func switchSelection(index: Int) {
32 | if index == 0 {
33 | colors[0] = Color.orange
34 | colors[1] = Color.white
35 | } else if index == 1 {
36 | colors[0] = Color.white
37 | colors[1] = Color.orange
38 | }
39 | }
40 | }
41 |
42 | struct ContentView_Previews: PreviewProvider {
43 | static var previews: some View {
44 | ContentView()
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/exclusiveButtons/exclusiveButtons/Preview Content/Preview Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/exclusiveButtons/exclusiveButtonsTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/exclusiveButtons/exclusiveButtonsTests/exclusiveButtonsTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // exclusiveButtonsTests.swift
3 | // exclusiveButtonsTests
4 | //
5 | // Created by Peter Lamar on 3/23/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 |
9 | @testable import exclusiveButtons
10 | import XCTest
11 |
12 | class exclusiveButtonsTests: XCTestCase {
13 | override func setUp() {
14 | // Put setup code here. This method is called before the invocation of each test method in the class.
15 | }
16 |
17 | override func tearDown() {
18 | // Put teardown code here. This method is called after the invocation of each test method in the class.
19 | }
20 |
21 | func testExample() {
22 | // This is an example of a functional test case.
23 | // Use XCTAssert and related functions to verify your tests produce the correct results.
24 | }
25 |
26 | func testPerformanceExample() {
27 | // This is an example of a performance test case.
28 | measure {
29 | // Put the code you want to measure the time of here.
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/exclusiveButtons/exclusiveButtonsUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/exclusiveLists/Shared/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/exclusiveLists/Shared/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/exclusiveLists/Shared/ContentView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ContentView.swift
3 | // Shared
4 | //
5 | // Created by Peter Lamar on 3/21/21.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct ContentView: View {
11 | struct FileItem: Hashable, Identifiable, CustomStringConvertible {
12 | var id: Self { self }
13 | var name: String
14 | var children: [FileItem]? = nil
15 | var description: String {
16 | switch children {
17 | case nil:
18 | return "📄 \(name)"
19 | case let .some(children):
20 | return children.isEmpty ? "📂 \(name)" : "📁 \(name)"
21 | }
22 | }
23 | }
24 |
25 | let fileHierarchyData: [FileItem] = [
26 | FileItem(name: "users", children:
27 | [FileItem(name: "user1234", children:
28 | [FileItem(name: "Photos", children:
29 | [FileItem(name: "photo001.jpg"),
30 | FileItem(name: "photo002.jpg")]),
31 | FileItem(name: "Movies", children:
32 | [FileItem(name: "movie001.mp4")]),
33 | FileItem(name: "Documents", children: [])]),
34 | FileItem(name: "newuser", children:
35 | [FileItem(name: "Documents", children: [])])]),
36 | FileItem(name: "private", children: nil),
37 | ]
38 | var body: some View {
39 | List(fileHierarchyData, children: \.children) { item in
40 | Text(item.description)
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/exclusiveLists/Shared/exclusiveListsApp.swift:
--------------------------------------------------------------------------------
1 | //
2 | // exclusiveListsApp.swift
3 | // Shared
4 | //
5 | // Created by Peter Lamar on 3/21/21.
6 | //
7 |
8 | import SwiftUI
9 |
10 | @main
11 | struct exclusiveListsApp: App {
12 | var body: some Scene {
13 | WindowGroup {
14 | ContentView()
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/exclusiveLists/exclusiveLists.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/exclusiveLists/exclusiveLists.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/exclusiveLists/exclusiveLists.xcodeproj/project.xcworkspace/xcuserdata/plamar.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/exclusiveLists/exclusiveLists.xcodeproj/project.xcworkspace/xcuserdata/plamar.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/exclusiveLists/exclusiveLists.xcodeproj/xcuserdata/plamar.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | exclusiveLists (iOS).xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 1
11 |
12 | exclusiveLists (macOS).xcscheme_^#shared#^_
13 |
14 | orderHint
15 | 0
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/exclusiveLists/macOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleVersion
22 | 1
23 | LSMinimumSystemVersion
24 | $(MACOSX_DEPLOYMENT_TARGET)
25 |
26 |
27 |
--------------------------------------------------------------------------------
/exclusiveLists/macOS/macOS.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.files.user-selected.read-only
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/firebaseswift2/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment the next line to define a global platform for your project
2 | # platform :ios, '9.0'
3 |
4 | target 'firebaseswift2 (iOS)' do
5 | # Comment the next line if you don't want to use dynamic frameworks
6 | use_frameworks!
7 |
8 | # Add the Firebase pod for Google Analytics
9 | pod 'Firebase/Analytics'
10 |
11 | # Add the pods for any other Firebase products you want to use in your app
12 | # For example, to use Firebase Authentication and Cloud Firestore
13 | pod 'Firebase/Auth'
14 | pod 'Firebase/Firestore'
15 | # Pods for firebaseswift2 (iOS)
16 |
17 | end
18 |
19 | target 'firebaseswift2 (macOS)' do
20 | # Comment the next line if you don't want to use dynamic frameworks
21 | use_frameworks!
22 |
23 | # Pods for firebaseswift2 (macOS)
24 |
25 | end
26 |
--------------------------------------------------------------------------------
/firebaseswift2/README.md:
--------------------------------------------------------------------------------
1 | # FirebaseSwift2
2 |
3 | Quick [examples](https://firebase.google.com/docs/firestore/query-data/get-data) in firebase
4 |
5 | [Workaround](https://medium.com/firebase-tips-tricks/how-to-list-all-subcollections-of-a-cloud-firestore-document-17f2bb80a166) for listing subcollections in mobile
6 |
--------------------------------------------------------------------------------
/firebaseswift2/Shared/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/firebaseswift2/Shared/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/firebaseswift2/Shared/firebaseswift2App.swift:
--------------------------------------------------------------------------------
1 | //
2 | // firebaseswift2App.swift
3 | // Shared
4 | //
5 | // Created by Peter Lamar on 3/14/21.
6 | //
7 |
8 | import Firebase
9 | import SwiftUI
10 |
11 | @main
12 | struct firebaseswift2App: App {
13 | init() {
14 | FirebaseApp.configure()
15 | }
16 |
17 | var body: some Scene {
18 | WindowGroup {
19 | ContentView()
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/firebaseswift2/firebaseswift2.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/firebaseswift2/firebaseswift2.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/firebaseswift2/firebaseswift2.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/firebaseswift2/firebaseswift2.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/firebaseswift2/macOS/macOS.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.files.user-selected.read-only
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/listinlist/listinlist.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/listinlist/listinlist.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/listinlist/listinlist.xcodeproj/project.xcworkspace/xcuserdata/peterlamar.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/listinlist/listinlist.xcodeproj/project.xcworkspace/xcuserdata/peterlamar.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/listinlist/listinlist.xcodeproj/xcuserdata/peterlamar.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | listinlist.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/listinlist/listinlist/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // listinlist
4 | //
5 | // Created by Peter Lamar on 4/5/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 | func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
14 | // Override point for customization after application launch.
15 | return true
16 | }
17 |
18 | // MARK: UISceneSession Lifecycle
19 |
20 | func application(_: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options _: UIScene.ConnectionOptions) -> UISceneConfiguration {
21 | // Called when a new scene session is being created.
22 | // Use this method to select a configuration to create the new scene with.
23 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
24 | }
25 |
26 | func application(_: UIApplication, didDiscardSceneSessions _: Set) {
27 | // Called when the user discards a scene session.
28 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
29 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/listinlist/listinlist/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/listinlist/listinlist/Preview Content/Preview Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/listinlist/listinlistTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/listinlist/listinlistTests/listinlistTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // listinlistTests.swift
3 | // listinlistTests
4 | //
5 | // Created by Peter Lamar on 4/5/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 |
9 | @testable import listinlist
10 | import XCTest
11 |
12 | class listinlistTests: XCTestCase {
13 | override func setUpWithError() throws {
14 | // Put setup code here. This method is called before the invocation of each test method in the class.
15 | }
16 |
17 | override func tearDownWithError() throws {
18 | // Put teardown code here. This method is called after the invocation of each test method in the class.
19 | }
20 |
21 | func testExample() throws {
22 | // This is an example of a functional test case.
23 | // Use XCTAssert and related functions to verify your tests produce the correct results.
24 | }
25 |
26 | func testPerformanceExample() throws {
27 | // This is an example of a performance test case.
28 | measure {
29 | // Put the code you want to measure the time of here.
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/listinlist/listinlistUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/photoLibrary/Shared/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/photoLibrary/Shared/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/photoLibrary/Shared/photoLibraryApp.swift:
--------------------------------------------------------------------------------
1 | //
2 | // photoLibraryApp.swift
3 | // Shared
4 | //
5 | // Created by Peter Lamar on 4/29/21.
6 | //
7 |
8 | import SwiftUI
9 |
10 | @main
11 | struct photoLibraryApp: App {
12 | var body: some Scene {
13 | WindowGroup {
14 | ContentView()
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/photoLibrary/macOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleVersion
22 | 1
23 | LSMinimumSystemVersion
24 | $(MACOSX_DEPLOYMENT_TARGET)
25 |
26 |
27 |
--------------------------------------------------------------------------------
/photoLibrary/macOS/macOS.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.files.user-selected.read-only
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/photoLibrary/photoLibrary.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/photoLibrary/photoLibrary.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/photoLibrary/photoLibrary.xcodeproj/project.xcworkspace/xcuserdata/plamar.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/photoLibrary/photoLibrary.xcodeproj/project.xcworkspace/xcuserdata/plamar.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/photoLibrary/photoLibrary.xcodeproj/xcuserdata/plamar.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | photoLibrary (iOS).xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 | photoLibrary (macOS).xcscheme_^#shared#^_
13 |
14 | orderHint
15 | 1
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/sublistDelete/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/sublistDelete/.DS_Store
--------------------------------------------------------------------------------
/sublistDelete/delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/sublistDelete/delete.png
--------------------------------------------------------------------------------
/sublistDelete/normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/sublistDelete/normal.png
--------------------------------------------------------------------------------
/sublistDelete/readme.md:
--------------------------------------------------------------------------------
1 | # sublistDelete
2 |
3 | How to use the built in delete functionality on a sublist. Example of tricky swift syntax.
4 |
5 | 
6 | 
7 |
--------------------------------------------------------------------------------
/sublistDelete/sublistDelete.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/sublistDelete/sublistDelete.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/sublistDelete/sublistDelete.xcodeproj/project.xcworkspace/xcuserdata/peterlamar.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/sublistDelete/sublistDelete.xcodeproj/project.xcworkspace/xcuserdata/peterlamar.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/sublistDelete/sublistDelete.xcodeproj/xcuserdata/peterlamar.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | sublistDelete.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sublistDelete/sublistDelete/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // sublistDelete
4 | //
5 | // Created by Peter Lamar on 4/29/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 | func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
14 | // Override point for customization after application launch.
15 | return true
16 | }
17 |
18 | // MARK: UISceneSession Lifecycle
19 |
20 | func application(_: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options _: UIScene.ConnectionOptions) -> UISceneConfiguration {
21 | // Called when a new scene session is being created.
22 | // Use this method to select a configuration to create the new scene with.
23 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
24 | }
25 |
26 | func application(_: UIApplication, didDiscardSceneSessions _: Set) {
27 | // Called when the user discards a scene session.
28 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
29 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/sublistDelete/sublistDelete/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/sublistDelete/sublistDelete/ContentView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ContentView.swift
3 | // sublistDelete
4 | //
5 | // Created by Peter Lamar on 4/29/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 |
9 | import SwiftUI
10 |
11 | struct ContentView: View {
12 | var data: [String: [String]] = ["DeptA": ["EmpA", "EmpB", "EmpC"],
13 | "DeptB": ["EmpD", "EmpE", "EmpF"]]
14 | var sections: [String] { data.keys.map { $0 } }
15 | func rows(section: Int) -> [String] { data[sections[section]]! }
16 |
17 | var body: some View {
18 | NavigationView {
19 | List {
20 | ForEach(0 ..< sections.count, id: \.self) { section in
21 | Section(header: Text(self.sections[section])) {
22 | ForEach(self.rows(section: section), id: \.self) { emp in
23 | Text(emp)
24 | }.onDelete { row in
25 | self.deleteEmp(section: section, row: row)
26 | }
27 | }
28 | }
29 | }.navigationBarTitle("Employees")
30 | }
31 | }
32 |
33 | private func deleteEmp(section: Int, row: IndexSet) {
34 | print("Section:", section)
35 | print("Row:", row.first!)
36 | }
37 | }
38 |
39 | struct ContentView_Previews: PreviewProvider {
40 | static var previews: some View {
41 | ContentView()
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/sublistDelete/sublistDelete/Preview Content/Preview Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/sublistDelete/sublistDeleteTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/sublistDelete/sublistDeleteTests/sublistDeleteTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // sublistDeleteTests.swift
3 | // sublistDeleteTests
4 | //
5 | // Created by Peter Lamar on 4/29/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 |
9 | @testable import sublistDelete
10 | import XCTest
11 |
12 | class sublistDeleteTests: XCTestCase {
13 | override func setUpWithError() throws {
14 | // Put setup code here. This method is called before the invocation of each test method in the class.
15 | }
16 |
17 | override func tearDownWithError() throws {
18 | // Put teardown code here. This method is called after the invocation of each test method in the class.
19 | }
20 |
21 | func testExample() throws {
22 | // This is an example of a functional test case.
23 | // Use XCTAssert and related functions to verify your tests produce the correct results.
24 | }
25 |
26 | func testPerformanceExample() throws {
27 | // This is an example of a performance test case.
28 | measure {
29 | // Put the code you want to measure the time of here.
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/sublistDelete/sublistDeleteUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/transitionButtons/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/transitionButtons/.DS_Store
--------------------------------------------------------------------------------
/transitionButtons/Simulator Screen Shot - iPhone SE (2nd generation) - 2020-04-29 at 15.57.38.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/transitionButtons/Simulator Screen Shot - iPhone SE (2nd generation) - 2020-04-29 at 15.57.38.png
--------------------------------------------------------------------------------
/transitionButtons/Simulator Screen Shot - iPhone SE (2nd generation) - 2020-04-29 at 15.57.40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/transitionButtons/Simulator Screen Shot - iPhone SE (2nd generation) - 2020-04-29 at 15.57.40.png
--------------------------------------------------------------------------------
/transitionButtons/readme.md:
--------------------------------------------------------------------------------
1 | # transitionButtons
2 |
3 | Simple example showing a button in transition
4 |
5 | %20-%202020-04-29%20at%2015.57.38.png)
6 | %20-%202020-04-29%20at%2015.57.40.png) - Button animates in
7 |
--------------------------------------------------------------------------------
/transitionButtons/transitionButtons.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/transitionButtons/transitionButtons.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/transitionButtons/transitionButtons.xcodeproj/project.xcworkspace/xcuserdata/peterlamar.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/transitionButtons/transitionButtons.xcodeproj/project.xcworkspace/xcuserdata/peterlamar.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/transitionButtons/transitionButtons.xcodeproj/xcuserdata/peterlamar.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | transitionButtons.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/transitionButtons/transitionButtons/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // transitionButtons
4 | //
5 | // Created by Peter Lamar on 4/28/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 | func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
14 | // Override point for customization after application launch.
15 | return true
16 | }
17 |
18 | // MARK: UISceneSession Lifecycle
19 |
20 | func application(_: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options _: UIScene.ConnectionOptions) -> UISceneConfiguration {
21 | // Called when a new scene session is being created.
22 | // Use this method to select a configuration to create the new scene with.
23 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
24 | }
25 |
26 | func application(_: UIApplication, didDiscardSceneSessions _: Set) {
27 | // Called when the user discards a scene session.
28 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
29 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/transitionButtons/transitionButtons/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/transitionButtons/transitionButtons/Preview Content/Preview Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/transitionButtons/transitionButtonsTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/transitionButtons/transitionButtonsTests/transitionButtonsTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // transitionButtonsTests.swift
3 | // transitionButtonsTests
4 | //
5 | // Created by Peter Lamar on 4/28/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 |
9 | @testable import transitionButtons
10 | import XCTest
11 |
12 | class transitionButtonsTests: XCTestCase {
13 | override func setUpWithError() throws {
14 | // Put setup code here. This method is called before the invocation of each test method in the class.
15 | }
16 |
17 | override func tearDownWithError() throws {
18 | // Put teardown code here. This method is called after the invocation of each test method in the class.
19 | }
20 |
21 | func testExample() throws {
22 | // This is an example of a functional test case.
23 | // Use XCTAssert and related functions to verify your tests produce the correct results.
24 | }
25 |
26 | func testPerformanceExample() throws {
27 | // This is an example of a performance test case.
28 | measure {
29 | // Put the code you want to measure the time of here.
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/transitionButtons/transitionButtonsUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/userActionNotification/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/userActionNotification/.DS_Store
--------------------------------------------------------------------------------
/userActionNotification/README.md:
--------------------------------------------------------------------------------
1 | # User Action notificaiton
2 |
3 | Official [documentation](https://developer.apple.com/documentation/usernotifications/declaring_your_actionable_notification_types)
4 |
5 | Referenced tutorials, but updated to use more swiftui
6 |
7 | [user-notifications-ios12](https://www.appcoda.com/user-notifications-ios12/)
8 |
9 | [preparing-your-app-for-ios-12-notifications](https://www.smashingmagazine.com/2018/09/preparing-your-app-for-ios-12-notifications/)
10 |
--------------------------------------------------------------------------------
/userActionNotification/userActionNotification.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/userActionNotification/userActionNotification.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/userActionNotification/userActionNotification.xcodeproj/project.xcworkspace/xcuserdata/peterlamar.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/userActionNotification/userActionNotification.xcodeproj/project.xcworkspace/xcuserdata/peterlamar.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/userActionNotification/userActionNotification.xcodeproj/xcuserdata/peterlamar.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | userActionNotification.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 | userNotificationExt.xcscheme_^#shared#^_
13 |
14 | orderHint
15 | 1
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/userActionNotification/userActionNotification/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/userActionNotification/userActionNotification/Preview Content/Preview Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/userActionNotification/userActionNotificationTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/userActionNotification/userActionNotificationTests/userActionNotificationTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // userActionNotificationTests.swift
3 | // userActionNotificationTests
4 | //
5 | // Created by Peter Lamar on 2/19/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 |
9 | @testable import userActionNotification
10 | import XCTest
11 |
12 | class userActionNotificationTests: XCTestCase {
13 | override func setUp() {
14 | // Put setup code here. This method is called before the invocation of each test method in the class.
15 | }
16 |
17 | override func tearDown() {
18 | // Put teardown code here. This method is called after the invocation of each test method in the class.
19 | }
20 |
21 | func testExample() {
22 | // This is an example of a functional test case.
23 | // Use XCTAssert and related functions to verify your tests produce the correct results.
24 | }
25 |
26 | func testPerformanceExample() {
27 | // This is an example of a performance test case.
28 | measure {
29 | // Put the code you want to measure the time of here.
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/userActionNotification/userActionNotificationUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/userActionNotification/userNotificationExt/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleDisplayName
8 | userNotificationExt
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleVersion
22 | 1
23 | NSExtension
24 |
25 | NSExtensionAttributes
26 |
27 | UNNotificationExtensionUserInteractionEnabled
28 |
29 | UNNotificationExtensionDefaultContentHidden
30 |
31 | UNNotificationExtensionCategory
32 | debitOverdraftNotification
33 | UNNotificationExtensionInitialContentSizeRatio
34 | 1
35 |
36 | NSExtensionMainStoryboard
37 | MainInterface
38 | NSExtensionPointIdentifier
39 | com.apple.usernotifications.content-extension
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/userActionNotification/userNotificationExt/NotificationViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // NotificationViewController.swift
3 | // userNotificationExt
4 | //
5 | // Created by Peter Lamar on 2/19/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import UserNotifications
11 | import UserNotificationsUI
12 |
13 | class NotificationViewController: UIViewController, UNNotificationContentExtension {
14 | @IBOutlet var label: UILabel?
15 |
16 | override func viewDidLoad() {
17 | super.viewDidLoad()
18 | // Do any required interface initialization here.
19 | }
20 |
21 | func didReceive(_ notification: UNNotification) {
22 | label?.text = notification.request.content.body
23 | }
24 |
25 | func didReceive(_ response: UNNotificationResponse, completionHandler _:
26 | (UNNotificationContentExtensionResponseOption) -> Void) {
27 | guard let currentActions = extensionContext?.notificationActions else { return }
28 |
29 | if response.actionIdentifier == "yes-action" {
30 | print("All your money are belong to us")
31 | }
32 | if response.actionIdentifier == "no-action" {
33 | print("Resistence is futile")
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/usernotification/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/usernotification/.DS_Store
--------------------------------------------------------------------------------
/usernotification/README.md:
--------------------------------------------------------------------------------
1 | # Notifications
2 |
3 | [Notifications Tutorial](https://www.hackingwithswift.com/books/ios-swiftui/scheduling-local-notifications)
4 |
--------------------------------------------------------------------------------
/usernotification/usernotification.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/usernotification/usernotification.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/usernotification/usernotification.xcodeproj/project.xcworkspace/xcuserdata/peterlamar.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/usernotification/usernotification.xcodeproj/project.xcworkspace/xcuserdata/peterlamar.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/usernotification/usernotification.xcodeproj/xcuserdata/peterlamar.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
--------------------------------------------------------------------------------
/usernotification/usernotification.xcodeproj/xcuserdata/peterlamar.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | usernotification.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/usernotification/usernotification/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // usernotification
4 | //
5 | // Created by Peter Lamar on 2/14/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 | func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
14 | // Override point for customization after application launch.
15 | return true
16 | }
17 |
18 | // MARK: UISceneSession Lifecycle
19 |
20 | func application(_: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options _: UIScene.ConnectionOptions) -> UISceneConfiguration {
21 | // Called when a new scene session is being created.
22 | // Use this method to select a configuration to create the new scene with.
23 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
24 | }
25 |
26 | func application(_: UIApplication, didDiscardSceneSessions _: Set) {
27 | // Called when the user discards a scene session.
28 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
29 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/usernotification/usernotification/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/usernotification/usernotification/Preview Content/Preview Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/usernotification/usernotificationTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/usernotification/usernotificationTests/usernotificationTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // usernotificationTests.swift
3 | // usernotificationTests
4 | //
5 | // Created by Peter Lamar on 2/14/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 |
9 | @testable import usernotification
10 | import XCTest
11 |
12 | class usernotificationTests: XCTestCase {
13 | override func setUp() {
14 | // Put setup code here. This method is called before the invocation of each test method in the class.
15 | }
16 |
17 | override func tearDown() {
18 | // Put teardown code here. This method is called after the invocation of each test method in the class.
19 | }
20 |
21 | func testExample() {
22 | // This is an example of a functional test case.
23 | // Use XCTAssert and related functions to verify your tests produce the correct results.
24 | }
25 |
26 | func testPerformanceExample() {
27 | // This is an example of a performance test case.
28 | measure {
29 | // Put the code you want to measure the time of here.
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/usernotification/usernotificationUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/viewbuilder/README.md:
--------------------------------------------------------------------------------
1 | # Viewbuilder example
2 |
3 | [Blog](https://swiftwithmajid.com/2019/12/18/the-power-of-viewbuilder-in-swiftui/) Source
4 |
5 |
--------------------------------------------------------------------------------
/viewbuilder/viewbuilder.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/viewbuilder/viewbuilder.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/viewbuilder/viewbuilder.xcodeproj/project.xcworkspace/xcuserdata/peterlamar.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/viewbuilder/viewbuilder.xcodeproj/project.xcworkspace/xcuserdata/peterlamar.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/viewbuilder/viewbuilder.xcodeproj/xcuserdata/peterlamar.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | viewbuilder.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/viewbuilder/viewbuilder/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // viewbuilder
4 | //
5 | // Created by Peter Lamar on 2/8/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 | func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
14 | // Override point for customization after application launch.
15 | return true
16 | }
17 |
18 | // MARK: UISceneSession Lifecycle
19 |
20 | func application(_: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options _: UIScene.ConnectionOptions) -> UISceneConfiguration {
21 | // Called when a new scene session is being created.
22 | // Use this method to select a configuration to create the new scene with.
23 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
24 | }
25 |
26 | func application(_: UIApplication, didDiscardSceneSessions _: Set) {
27 | // Called when the user discards a scene session.
28 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
29 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/viewbuilder/viewbuilder/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/viewbuilder/viewbuilder/ContentView.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct NotificationView: View {
4 | let content: Content
5 |
6 | init(@ViewBuilder content: () -> Content) {
7 | self.content = content()
8 | }
9 |
10 | var body: some View {
11 | content
12 | .padding()
13 | .background(Color(.tertiarySystemBackground))
14 | .cornerRadius(16)
15 | .transition(.move(edge: .top))
16 | .animation(.spring())
17 | }
18 | }
19 |
20 | struct ContentView: View {
21 | @State private var notificationShown = false
22 |
23 | var body: some View {
24 | VStack {
25 | if self.notificationShown {
26 | NotificationView {
27 | Text("notification")
28 | }
29 | }
30 |
31 | Spacer()
32 |
33 | Button("toggle") {
34 | self.notificationShown.toggle()
35 | }
36 |
37 | Spacer()
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/viewbuilder/viewbuilder/Preview Content/Preview Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/viewbuilder/viewbuilderTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/viewbuilder/viewbuilderTests/viewbuilderTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // viewbuilderTests.swift
3 | // viewbuilderTests
4 | //
5 | // Created by Peter Lamar on 2/8/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 |
9 | @testable import viewbuilder
10 | import XCTest
11 |
12 | class viewbuilderTests: XCTestCase {
13 | override func setUp() {
14 | // Put setup code here. This method is called before the invocation of each test method in the class.
15 | }
16 |
17 | override func tearDown() {
18 | // Put teardown code here. This method is called after the invocation of each test method in the class.
19 | }
20 |
21 | func testExample() {
22 | // This is an example of a functional test case.
23 | // Use XCTAssert and related functions to verify your tests produce the correct results.
24 | }
25 |
26 | func testPerformanceExample() {
27 | // This is an example of a performance test case.
28 | measure {
29 | // Put the code you want to measure the time of here.
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/viewbuilder/viewbuilderUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/viewbuilder/viewbuilderUITests/viewbuilderUITests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // viewbuilderUITests.swift
3 | // viewbuilderUITests
4 | //
5 | // Created by Peter Lamar on 2/8/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 |
9 | import XCTest
10 |
11 | class viewbuilderUITests: XCTestCase {
12 | override func setUp() {
13 | // Put setup code here. This method is called before the invocation of each test method in the class.
14 |
15 | // In UI tests it is usually best to stop immediately when a failure occurs.
16 | continueAfterFailure = false
17 |
18 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
19 | }
20 |
21 | override func tearDown() {
22 | // Put teardown code here. This method is called after the invocation of each test method in the class.
23 | }
24 |
25 | func testExample() {
26 | // UI tests must launch the application that they test.
27 | let app = XCUIApplication()
28 | app.launch()
29 |
30 | // Use recording to get started writing UI tests.
31 | // Use XCTAssert and related functions to verify your tests produce the correct results.
32 | }
33 |
34 | func testLaunchPerformance() {
35 | if #available(macOS 10.15, iOS 13.0, tvOS 13.0, *) {
36 | // This measures how long it takes to launch your application.
37 | measure(metrics: [XCTOSSignpostMetric.applicationLaunch]) {
38 | XCUIApplication().launch()
39 | }
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/warCardGame/README.md:
--------------------------------------------------------------------------------
1 | # UIKit Logic
2 |
3 | Lesson 4 from:
4 |
5 | https://codewithchris.com/beginner-youtube/
6 |
--------------------------------------------------------------------------------
/warCardGame/warCardGame.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/warCardGame/warCardGame.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/warCardGame/warCardGame.xcodeproj/project.xcworkspace/xcuserdata/peterlamar.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame.xcodeproj/project.xcworkspace/xcuserdata/peterlamar.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/warCardGame/warCardGame.xcodeproj/xcuserdata/peterlamar.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | warCardGame.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/warCardGame/warCardGame/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // warCardGame
4 | //
5 | // Created by Peter Lamar on 2/21/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 | func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
14 | // Override point for customization after application launch.
15 | return true
16 | }
17 |
18 | // MARK: UISceneSession Lifecycle
19 |
20 | func application(_: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options _: UIScene.ConnectionOptions) -> UISceneConfiguration {
21 | // Called when a new scene session is being created.
22 | // Use this method to select a configuration to create the new scene with.
23 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
24 | }
25 |
26 | func application(_: UIApplication, didDiscardSceneSessions _: Set) {
27 | // Called when the user discards a scene session.
28 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
29 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/Background.imageset/Background.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/Background.imageset/Background.jpg
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/Background.imageset/Background@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/Background.imageset/Background@2x.jpg
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/Background.imageset/Background@3x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/Background.imageset/Background@3x.jpg
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/Background.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "Background.jpg",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "Background@2x.jpg",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "Background@3x.jpg",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/back.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "back.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "back@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "back@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/back.imageset/back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/back.imageset/back.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/back.imageset/back@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/back.imageset/back@2x.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/back.imageset/back@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/back.imageset/back@3x.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card10.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "card10.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "card10@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "card10@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card10.imageset/card10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card10.imageset/card10.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card10.imageset/card10@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card10.imageset/card10@2x.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card10.imageset/card10@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card10.imageset/card10@3x.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card11.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "card11.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "card11@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "card11@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card11.imageset/card11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card11.imageset/card11.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card11.imageset/card11@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card11.imageset/card11@2x.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card11.imageset/card11@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card11.imageset/card11@3x.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card12.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "card12.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "card12@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "card12@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card12.imageset/card12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card12.imageset/card12.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card12.imageset/card12@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card12.imageset/card12@2x.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card12.imageset/card12@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card12.imageset/card12@3x.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card13.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "card13.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "card13@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "card13@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card13.imageset/card13.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card13.imageset/card13.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card13.imageset/card13@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card13.imageset/card13@2x.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card13.imageset/card13@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card13.imageset/card13@3x.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card14.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "card14.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "card14@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "card14@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card14.imageset/card14.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card14.imageset/card14.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card14.imageset/card14@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card14.imageset/card14@2x.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card14.imageset/card14@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card14.imageset/card14@3x.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card2.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "card2.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "card2@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "card2@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card2.imageset/card2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card2.imageset/card2.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card2.imageset/card2@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card2.imageset/card2@2x.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card2.imageset/card2@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card2.imageset/card2@3x.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card3.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "card3.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "card3@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "card3@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card3.imageset/card3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card3.imageset/card3.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card3.imageset/card3@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card3.imageset/card3@2x.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card3.imageset/card3@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card3.imageset/card3@3x.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card4.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "card4.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "card4@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "card4@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card4.imageset/card4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card4.imageset/card4.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card4.imageset/card4@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card4.imageset/card4@2x.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card4.imageset/card4@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card4.imageset/card4@3x.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card5.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "card5.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "card5@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "card5@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card5.imageset/card5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card5.imageset/card5.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card5.imageset/card5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card5.imageset/card5@2x.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card5.imageset/card5@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card5.imageset/card5@3x.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card6.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "card6.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "card6@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "card6@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card6.imageset/card6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card6.imageset/card6.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card6.imageset/card6@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card6.imageset/card6@2x.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card6.imageset/card6@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card6.imageset/card6@3x.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card7.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "card7.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "card7@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "card7@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card7.imageset/card7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card7.imageset/card7.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card7.imageset/card7@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card7.imageset/card7@2x.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card7.imageset/card7@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card7.imageset/card7@3x.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card8.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "card8.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "card8@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "card8@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card8.imageset/card8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card8.imageset/card8.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card8.imageset/card8@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card8.imageset/card8@2x.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card8.imageset/card8@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card8.imageset/card8@3x.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card9.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "card9.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "card9@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "card9@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card9.imageset/card9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card9.imageset/card9.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card9.imageset/card9@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card9.imageset/card9@2x.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/card9.imageset/card9@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/card9.imageset/card9@3x.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/dealbutton.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "dealbutton.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "dealbutton@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "dealbutton@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/dealbutton.imageset/dealbutton.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/dealbutton.imageset/dealbutton.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/dealbutton.imageset/dealbutton@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/dealbutton.imageset/dealbutton@2x.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/dealbutton.imageset/dealbutton@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/dealbutton.imageset/dealbutton@3x.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/logo.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "logo.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "logo@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "logo@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/logo.imageset/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/logo.imageset/logo.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/logo.imageset/logo@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/logo.imageset/logo@2x.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/Assets.xcassets/logo.imageset/logo@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterlamar/swiftui-examples/d4a7d598cafa74a7eb2d9187eeff1921290ee601/warCardGame/warCardGame/Assets.xcassets/logo.imageset/logo@3x.png
--------------------------------------------------------------------------------
/warCardGame/warCardGame/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // warCardGame
4 | //
5 | // Created by Peter Lamar on 2/21/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 | override func viewDidLoad() {
13 | super.viewDidLoad()
14 | // Do any additional setup after loading the view.
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/warCardGame/warCardGameTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/warCardGame/warCardGameTests/warCardGameTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // warCardGameTests.swift
3 | // warCardGameTests
4 | //
5 | // Created by Peter Lamar on 2/21/20.
6 | // Copyright © 2020 Peter Lamar. All rights reserved.
7 | //
8 |
9 | @testable import warCardGame
10 | import XCTest
11 |
12 | class warCardGameTests: XCTestCase {
13 | override func setUp() {
14 | // Put setup code here. This method is called before the invocation of each test method in the class.
15 | }
16 |
17 | override func tearDown() {
18 | // Put teardown code here. This method is called after the invocation of each test method in the class.
19 | }
20 |
21 | func testExample() {
22 | // This is an example of a functional test case.
23 | // Use XCTAssert and related functions to verify your tests produce the correct results.
24 | }
25 |
26 | func testPerformanceExample() {
27 | // This is an example of a performance test case.
28 | measure {
29 | // Put the code you want to measure the time of here.
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/warCardGame/warCardGameUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------