├── .DS_Store ├── .gitignore ├── 01-first_app ├── .DS_Store ├── 01-first_app.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── 01-first_app │ ├── 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 ├── 02-images ├── .DS_Store ├── 02-images.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── 02-images │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ └── newyork.imageset │ │ ├── Contents.json │ │ └── fezbot2000-deNAgNLr0b8-unsplash.jpg │ ├── Base.lproj │ └── LaunchScreen.storyboard │ ├── ContentView.swift │ ├── Info.plist │ ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json │ └── SceneDelegate.swift ├── 03-stacks ├── .DS_Store ├── 03-stacks.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── 03-stacks │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── Base.lproj │ └── LaunchScreen.storyboard │ ├── ContentView.swift │ ├── ExerciseView.swift │ ├── Info.plist │ ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json │ └── SceneDelegate.swift ├── 04-ScrollCardView ├── .DS_Store ├── 04-ScrollCardView.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── 04-ScrollCardView │ ├── .DS_Store │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ ├── logo-udemy.imageset │ │ ├── Contents.json │ │ └── default-meta-image.png │ ├── maths.imageset │ │ ├── 2521460_3ad6_2-2.jpg │ │ └── Contents.json │ ├── python.imageset │ │ ├── 2770738_e3ad.jpg │ │ └── Contents.json │ ├── swift.imageset │ │ ├── 2397342_68bf_2.jpg │ │ └── Contents.json │ └── videogames.imageset │ │ ├── 2438730_59f7_3.jpg │ │ └── Contents.json │ ├── Base.lproj │ └── LaunchScreen.storyboard │ ├── CardView.swift │ ├── ContentView.swift │ ├── Info.plist │ ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json │ └── SceneDelegate.swift ├── 05-buttons ├── .DS_Store ├── 05-buttons.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── 05-buttons │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ ├── Dark Ocean 1.colorset │ │ └── Contents.json │ └── Dark Ocean 2.colorset │ │ └── Contents.json │ ├── Base.lproj │ └── LaunchScreen.storyboard │ ├── ContentView.swift │ ├── Info.plist │ ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json │ └── SceneDelegate.swift ├── 06-states_bindings ├── .DS_Store ├── 06-states_bindings.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── 06-states_bindings │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── Base.lproj │ └── LaunchScreen.storyboard │ ├── ClickView.swift │ ├── ContentView.swift │ ├── Info.plist │ ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json │ └── SceneDelegate.swift ├── 07-draw ├── .DS_Store ├── 07-draw.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── 07-draw │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── Base.lproj │ └── LaunchScreen.storyboard │ ├── ContentView.swift │ ├── CurveView.swift │ ├── DougnutView.swift │ ├── Info.plist │ ├── PieView.swift │ ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json │ ├── ProgressIndicator.swift │ └── SceneDelegate.swift ├── 08-anims ├── .DS_Store ├── 08-anims.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── 08-anims │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── Base.lproj │ └── LaunchScreen.storyboard │ ├── ContentView.swift │ ├── DotsLoadingView.swift │ ├── Info.plist │ ├── LoadingBarView.swift │ ├── LoadingView.swift │ ├── MorphView.swift │ ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json │ ├── ProgressView.swift │ └── SceneDelegate.swift ├── 09-transitions ├── .DS_Store ├── 09-transitions.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── 09-transitions │ ├── 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 ├── 10-lists ├── .DS_Store ├── 10-lists.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── 10-lists │ ├── .DS_Store │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── .DS_Store │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ ├── maths.imageset │ │ ├── 2521460_3ad6_2-2.jpg │ │ └── Contents.json │ ├── ml_az.imageset │ │ ├── 2241862_0a58.jpg │ │ └── Contents.json │ ├── python.imageset │ │ ├── 2770738_e3ad.jpg │ │ └── Contents.json │ ├── selectividad.imageset │ │ ├── 2647510_7b8f-2.jpg │ │ └── Contents.json │ ├── swift.imageset │ │ ├── 2397342_68bf_2.jpg │ │ └── Contents.json │ ├── tensorflow2.imageset │ │ ├── 2440222_929d_2.jpg │ │ └── Contents.json │ ├── unrealengine.imageset │ │ ├── 1910458_3e7f_3.jpg │ │ └── Contents.json │ └── videogames.imageset │ │ ├── 2438730_59f7_3.jpg │ │ └── Contents.json │ ├── Base.lproj │ └── LaunchScreen.storyboard │ ├── ContentView.swift │ ├── Info.plist │ ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json │ └── SceneDelegate.swift ├── 11-navigation ├── .DS_Store ├── 11-navigation.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── 11-navigation │ ├── .DS_Store │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── .DS_Store │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ ├── maths.imageset │ │ ├── 2521460_3ad6_2-2.jpg │ │ └── Contents.json │ ├── ml_az.imageset │ │ ├── 2241862_0a58.jpg │ │ └── Contents.json │ ├── python.imageset │ │ ├── 2770738_e3ad.jpg │ │ └── Contents.json │ ├── selectividad.imageset │ │ ├── 2647510_7b8f-2.jpg │ │ └── Contents.json │ ├── swift.imageset │ │ ├── 2397342_68bf_2.jpg │ │ └── Contents.json │ ├── tensorflow2.imageset │ │ ├── 2440222_929d_2.jpg │ │ └── Contents.json │ ├── unrealengine.imageset │ │ ├── 1910458_3e7f_3.jpg │ │ └── Contents.json │ └── videogames.imageset │ │ ├── 2438730_59f7_3.jpg │ │ └── Contents.json │ ├── Base.lproj │ └── LaunchScreen.storyboard │ ├── ContentView.swift │ ├── DetailView.swift │ ├── Info.plist │ ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json │ └── SceneDelegate.swift ├── 12-modals ├── .DS_Store ├── 12-modals.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── 12-modals │ ├── .DS_Store │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── .DS_Store │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ ├── maths.imageset │ │ ├── 2521460_3ad6_2-2.jpg │ │ └── Contents.json │ ├── ml_az.imageset │ │ ├── 2241862_0a58.jpg │ │ └── Contents.json │ ├── python.imageset │ │ ├── 2770738_e3ad.jpg │ │ └── Contents.json │ ├── selectividad.imageset │ │ ├── 2647510_7b8f-2.jpg │ │ └── Contents.json │ ├── swift.imageset │ │ ├── 2397342_68bf_2.jpg │ │ └── Contents.json │ ├── tensorflow2.imageset │ │ ├── 2440222_929d_2.jpg │ │ └── Contents.json │ ├── unrealengine.imageset │ │ ├── 1910458_3e7f_3.jpg │ │ └── Contents.json │ └── videogames.imageset │ │ ├── 2438730_59f7_3.jpg │ │ └── Contents.json │ ├── Base.lproj │ └── LaunchScreen.storyboard │ ├── Info.plist │ ├── Model │ ├── Course.swift │ └── CourseFactory.swift │ ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json │ ├── SceneDelegate.swift │ └── View │ ├── ContentView.swift │ └── DetailView.swift ├── 13-forms ├── .DS_Store ├── 13-forms.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── 13-forms │ ├── .DS_Store │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── .DS_Store │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ ├── maths.imageset │ │ ├── 2521460_3ad6_2-2.jpg │ │ └── Contents.json │ ├── ml_az.imageset │ │ ├── 2241862_0a58.jpg │ │ └── Contents.json │ ├── python.imageset │ │ ├── 2770738_e3ad.jpg │ │ └── Contents.json │ ├── selectividad.imageset │ │ ├── 2647510_7b8f-2.jpg │ │ └── Contents.json │ ├── swift.imageset │ │ ├── 2397342_68bf_2.jpg │ │ └── Contents.json │ ├── tensorflow2.imageset │ │ ├── 2440222_929d_2.jpg │ │ └── Contents.json │ ├── unrealengine.imageset │ │ ├── 1910458_3e7f_3.jpg │ │ └── Contents.json │ └── videogames.imageset │ │ ├── 2438730_59f7_3.jpg │ │ └── Contents.json │ ├── Base.lproj │ └── LaunchScreen.storyboard │ ├── ContentView.swift │ ├── Course.swift │ ├── DetailView.swift │ ├── Info.plist │ ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json │ ├── SceneDelegate.swift │ ├── SettingsFactory.swift │ ├── SettingsView.swift │ └── SortingOrderType.swift ├── 14-sign_up ├── .DS_Store ├── 14-sign_up.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── 14-sign_up │ ├── 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 │ ├── RegistrationViewModel.swift │ └── SceneDelegate.swift ├── 15-gestos ├── .DS_Store ├── 15-gestos.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── 15-gestos │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── Base.lproj │ └── LaunchScreen.storyboard │ ├── ContentView.swift │ ├── DragView.swift │ ├── DraggableView.swift │ ├── Info.plist │ ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json │ └── SceneDelegate.swift ├── P1-ExpandableBottomSheet ├── .DS_Store ├── P1-ExpandableBottomSheet.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── P1-ExpandableBottomSheet │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── .DS_Store │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ ├── maths.imageset │ │ ├── 2521460_3ad6_2-2.jpg │ │ └── Contents.json │ ├── ml_az.imageset │ │ ├── 2241862_0a58.jpg │ │ └── Contents.json │ ├── python.imageset │ │ ├── 2770738_e3ad.jpg │ │ └── Contents.json │ ├── selectividad.imageset │ │ ├── 2647510_7b8f-2.jpg │ │ └── Contents.json │ ├── swift.imageset │ │ ├── 2397342_68bf_2.jpg │ │ └── Contents.json │ ├── tensorflow2.imageset │ │ ├── 2440222_929d_2.jpg │ │ └── Contents.json │ ├── unrealengine.imageset │ │ ├── 1910458_3e7f_3.jpg │ │ └── Contents.json │ └── videogames.imageset │ │ ├── 2438730_59f7_3.jpg │ │ └── Contents.json │ ├── Base.lproj │ └── LaunchScreen.storyboard │ ├── ContentView.swift │ ├── Course.swift │ ├── CourseDetailView.swift │ ├── DragState.swift │ ├── Info.plist │ ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json │ └── SceneDelegate.swift ├── P2-Tinder ├── .DS_Store ├── P2-Tinder.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── P2-Tinder │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── .DS_Store │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ ├── maths.imageset │ │ ├── 2521460_3ad6_2-2.jpg │ │ └── Contents.json │ ├── ml_az.imageset │ │ ├── 2241862_0a58.jpg │ │ └── Contents.json │ ├── python.imageset │ │ ├── 2770738_e3ad.jpg │ │ └── Contents.json │ ├── selectividad.imageset │ │ ├── 2647510_7b8f-2.jpg │ │ └── Contents.json │ ├── swift.imageset │ │ ├── 2397342_68bf_2.jpg │ │ └── Contents.json │ ├── tensorflow2.imageset │ │ ├── 2440222_929d_2.jpg │ │ └── Contents.json │ ├── unrealengine.imageset │ │ ├── 1910458_3e7f_3.jpg │ │ └── Contents.json │ └── videogames.imageset │ │ ├── 2438730_59f7_3.jpg │ │ └── Contents.json │ ├── Base.lproj │ └── LaunchScreen.storyboard │ ├── CardView.swift │ ├── ContentView.swift │ ├── Course.swift │ ├── DragState.swift │ ├── Extesions.swift │ ├── Info.plist │ ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json │ └── SceneDelegate.swift ├── P3-AppleWallet ├── .DS_Store ├── P3-AppleWallet.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── P3-AppleWallet │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── .DS_Store │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ ├── basic.imageset │ │ ├── Contents.json │ │ └── basic.png │ ├── gold.imageset │ │ ├── Contents.json │ │ └── gold.png │ ├── platinum.imageset │ │ ├── Contents.json │ │ └── platinum.png │ └── standard.imageset │ │ ├── Contents.json │ │ └── standard.png │ ├── Base.lproj │ └── LaunchScreen.storyboard │ ├── Info.plist │ ├── Model │ ├── Card.swift │ └── Transaction.swift │ ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json │ ├── SceneDelegate.swift │ └── View │ ├── ContentView.swift │ ├── DragState.swift │ └── TransactionHistoryView.swift ├── README.md └── Resources ├── .DS_Store ├── Capturas Cursos ├── .DS_Store ├── 2397342_68bf_2.jpg ├── 2438730_59f7_3.jpg ├── 2521460_3ad6_2-2.jpg └── 2770738_e3ad.jpg ├── Cards ├── .DS_Store ├── basic.png ├── gold.png ├── platinum.png └── standard.png ├── JSONPlayground.playground ├── Contents.swift └── contents.xcplayground ├── Reto1.png ├── Shapes.sketch ├── Stacks.sketch ├── example_2.json └── newyork.jpg /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/.DS_Store -------------------------------------------------------------------------------- /01-first_app/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/01-first_app/.DS_Store -------------------------------------------------------------------------------- /01-first_app/01-first_app.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /01-first_app/01-first_app.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /01-first_app/01-first_app/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // 01-first_app 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 06/02/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | // Override point for customization after application launch. 18 | return true 19 | } 20 | 21 | // MARK: UISceneSession Lifecycle 22 | 23 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 24 | // Called when a new scene session is being created. 25 | // Use this method to select a configuration to create the new scene with. 26 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 27 | } 28 | 29 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 30 | // Called when the user discards a scene session. 31 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 32 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 33 | } 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /01-first_app/01-first_app/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /01-first_app/01-first_app/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /01-first_app/01-first_app/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // 01-first_app 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 06/02/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct ContentView: View { 12 | var body: some View { 13 | Text("Soy licenciado en matemáticas, especializado en el análisis de datos para empresas de videojuegos con R y Python, en Game Design para videojuegos de social casino, en el desarrollo de aplicaciones móviles para iOS y para Android y desarrollador de videojuegos utilizando los motores Unreal Engine y Unity tanto para PC como para móvil desde el año 2011.") 14 | .fontWeight(.regular) 15 | .font(.custom("Gill Sans", size: 25)) 16 | .foregroundColor(.blue) 17 | .multilineTextAlignment(.center) 18 | .lineLimit(nil) 19 | .truncationMode(.middle) 20 | .lineSpacing(8).padding() 21 | // .rotationEffect(.degrees(15), anchor: UnitPoint(x: 0, y: 0)) 22 | .rotation3DEffect(.degrees(50), axis: (x: 1, y: 0, z: 0)) 23 | .shadow(color: .gray, radius: 1, x: 0, y: 5) 24 | } 25 | } 26 | 27 | struct ContentView_Previews: PreviewProvider { 28 | static var previews: some View { 29 | ContentView() 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /01-first_app/01-first_app/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /02-images/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/02-images/.DS_Store -------------------------------------------------------------------------------- /02-images/02-images.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /02-images/02-images.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /02-images/02-images/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // 02-images 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 06/02/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | // Override point for customization after application launch. 18 | return true 19 | } 20 | 21 | // MARK: UISceneSession Lifecycle 22 | 23 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 24 | // Called when a new scene session is being created. 25 | // Use this method to select a configuration to create the new scene with. 26 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 27 | } 28 | 29 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 30 | // Called when the user discards a scene session. 31 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 32 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 33 | } 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /02-images/02-images/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /02-images/02-images/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /02-images/02-images/Assets.xcassets/newyork.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "idiom" : "universal", 13 | "filename" : "fezbot2000-deNAgNLr0b8-unsplash.jpg", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /02-images/02-images/Assets.xcassets/newyork.imageset/fezbot2000-deNAgNLr0b8-unsplash.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/02-images/02-images/Assets.xcassets/newyork.imageset/fezbot2000-deNAgNLr0b8-unsplash.jpg -------------------------------------------------------------------------------- /02-images/02-images/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /02-images/02-images/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // 02-images 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 06/02/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct ContentView: View { 12 | var body: some View { 13 | 14 | Image("newyork") 15 | .resizable() 16 | //.edgesIgnoringSafeArea(.vertical) 17 | //.scaledToFit() 18 | .aspectRatio(contentMode: .fill) 19 | .frame(width:300) 20 | //.clipped() 21 | .clipShape(Capsule()) 22 | .opacity(0.9) 23 | .overlay( 24 | /*Image(systemName: "heart.fill") 25 | .font(.system(size: 60)) 26 | .foregroundColor(.pink) 27 | .opacity(0.5)*/ 28 | 29 | /*Text("Qué ganas de volver a Nueva York, sentir el frío en invierno y pasear por Central Park con un buen bagel en la mano!") 30 | .fontWeight(.bold) 31 | .font(.system(.headline, design:.rounded)) 32 | .foregroundColor(.white) 33 | .padding() 34 | .background(Color.gray) 35 | .cornerRadius(10) 36 | .opacity(0.7) 37 | .padding(), 38 | alignment: .bottom*/ 39 | Capsule() 40 | .foregroundColor(.gray) 41 | .opacity(0.5) 42 | .overlay( 43 | Text("Nueva York") 44 | .font(.title) 45 | .fontWeight(.bold) 46 | .foregroundColor(.white) 47 | .frame(width: 250) 48 | 49 | ) 50 | ) 51 | } 52 | } 53 | 54 | struct ContentView_Previews: PreviewProvider { 55 | static var previews: some View { 56 | ContentView() 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /02-images/02-images/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /03-stacks/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/03-stacks/.DS_Store -------------------------------------------------------------------------------- /03-stacks/03-stacks.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /03-stacks/03-stacks.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /03-stacks/03-stacks/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // 03-stacks 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 11/02/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | // Override point for customization after application launch. 18 | return true 19 | } 20 | 21 | // MARK: UISceneSession Lifecycle 22 | 23 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 24 | // Called when a new scene session is being created. 25 | // Use this method to select a configuration to create the new scene with. 26 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 27 | } 28 | 29 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 30 | // Called when the user discards a scene session. 31 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 32 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 33 | } 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /03-stacks/03-stacks/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /03-stacks/03-stacks/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /03-stacks/03-stacks/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /03-stacks/03-stacks/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /04-ScrollCardView/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/04-ScrollCardView/.DS_Store -------------------------------------------------------------------------------- /04-ScrollCardView/04-ScrollCardView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /04-ScrollCardView/04-ScrollCardView.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /04-ScrollCardView/04-ScrollCardView/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/04-ScrollCardView/04-ScrollCardView/.DS_Store -------------------------------------------------------------------------------- /04-ScrollCardView/04-ScrollCardView/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // 04-ScrollCardView 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 12/02/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | // Override point for customization after application launch. 18 | return true 19 | } 20 | 21 | // MARK: UISceneSession Lifecycle 22 | 23 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 24 | // Called when a new scene session is being created. 25 | // Use this method to select a configuration to create the new scene with. 26 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 27 | } 28 | 29 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 30 | // Called when the user discards a scene session. 31 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 32 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 33 | } 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /04-ScrollCardView/04-ScrollCardView/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /04-ScrollCardView/04-ScrollCardView/Assets.xcassets/logo-udemy.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "idiom" : "universal", 13 | "filename" : "default-meta-image.png", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /04-ScrollCardView/04-ScrollCardView/Assets.xcassets/logo-udemy.imageset/default-meta-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/04-ScrollCardView/04-ScrollCardView/Assets.xcassets/logo-udemy.imageset/default-meta-image.png -------------------------------------------------------------------------------- /04-ScrollCardView/04-ScrollCardView/Assets.xcassets/maths.imageset/2521460_3ad6_2-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/04-ScrollCardView/04-ScrollCardView/Assets.xcassets/maths.imageset/2521460_3ad6_2-2.jpg -------------------------------------------------------------------------------- /04-ScrollCardView/04-ScrollCardView/Assets.xcassets/maths.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2521460_3ad6_2-2.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /04-ScrollCardView/04-ScrollCardView/Assets.xcassets/python.imageset/2770738_e3ad.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/04-ScrollCardView/04-ScrollCardView/Assets.xcassets/python.imageset/2770738_e3ad.jpg -------------------------------------------------------------------------------- /04-ScrollCardView/04-ScrollCardView/Assets.xcassets/python.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2770738_e3ad.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /04-ScrollCardView/04-ScrollCardView/Assets.xcassets/swift.imageset/2397342_68bf_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/04-ScrollCardView/04-ScrollCardView/Assets.xcassets/swift.imageset/2397342_68bf_2.jpg -------------------------------------------------------------------------------- /04-ScrollCardView/04-ScrollCardView/Assets.xcassets/swift.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2397342_68bf_2.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /04-ScrollCardView/04-ScrollCardView/Assets.xcassets/videogames.imageset/2438730_59f7_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/04-ScrollCardView/04-ScrollCardView/Assets.xcassets/videogames.imageset/2438730_59f7_3.jpg -------------------------------------------------------------------------------- /04-ScrollCardView/04-ScrollCardView/Assets.xcassets/videogames.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2438730_59f7_3.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /04-ScrollCardView/04-ScrollCardView/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /04-ScrollCardView/04-ScrollCardView/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /05-buttons/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/05-buttons/.DS_Store -------------------------------------------------------------------------------- /05-buttons/05-buttons.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /05-buttons/05-buttons.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /05-buttons/05-buttons/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // 05-buttons 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 12/02/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | // Override point for customization after application launch. 18 | return true 19 | } 20 | 21 | // MARK: UISceneSession Lifecycle 22 | 23 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 24 | // Called when a new scene session is being created. 25 | // Use this method to select a configuration to create the new scene with. 26 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 27 | } 28 | 29 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 30 | // Called when the user discards a scene session. 31 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 32 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 33 | } 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /05-buttons/05-buttons/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /05-buttons/05-buttons/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /05-buttons/05-buttons/Assets.xcassets/Dark Ocean 1.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "srgb", 11 | "components" : { 12 | "red" : "0x37", 13 | "alpha" : "1.000", 14 | "blue" : "0x44", 15 | "green" : "0x3B" 16 | } 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /05-buttons/05-buttons/Assets.xcassets/Dark Ocean 2.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "srgb", 11 | "components" : { 12 | "red" : "0x42", 13 | "alpha" : "1.000", 14 | "blue" : "0xF4", 15 | "green" : "0x86" 16 | } 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /05-buttons/05-buttons/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /05-buttons/05-buttons/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /06-states_bindings/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/06-states_bindings/.DS_Store -------------------------------------------------------------------------------- /06-states_bindings/06-states_bindings.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /06-states_bindings/06-states_bindings.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /06-states_bindings/06-states_bindings/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // 06-states_bindings 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 15/02/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | // Override point for customization after application launch. 18 | return true 19 | } 20 | 21 | // MARK: UISceneSession Lifecycle 22 | 23 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 24 | // Called when a new scene session is being created. 25 | // Use this method to select a configuration to create the new scene with. 26 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 27 | } 28 | 29 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 30 | // Called when the user discards a scene session. 31 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 32 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 33 | } 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /06-states_bindings/06-states_bindings/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /06-states_bindings/06-states_bindings/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /06-states_bindings/06-states_bindings/ClickView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ClickView.swift 3 | // 06-states_bindings 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 15/02/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct ClickView: View { 12 | 13 | @State private var numClicks1 = 0 14 | @State private var numClicks2 = 0 15 | @State private var numClicks3 = 0 16 | 17 | var body: some View { 18 | VStack { 19 | Text("\(numClicks1+numClicks2+numClicks3)") 20 | .font(.system(size:100, weight:.black, design:.rounded)) 21 | CounterView(numClicks: $numClicks1, buttonColor: .purple) 22 | CounterView(numClicks: $numClicks2, buttonColor: .yellow) 23 | CounterView(numClicks: $numClicks3, buttonColor: .green) 24 | } 25 | } 26 | } 27 | 28 | struct ClickView_Previews: PreviewProvider { 29 | static var previews: some View { 30 | ClickView() 31 | } 32 | } 33 | 34 | struct CounterView: View { 35 | 36 | @Binding var numClicks: Int 37 | 38 | var buttonColor: Color 39 | 40 | var body: some View { 41 | Button(action:{ 42 | self.numClicks += 1 43 | }){ 44 | Circle() 45 | .frame(width: 150, height: 150) 46 | .foregroundColor(buttonColor) 47 | .overlay(Text("\(numClicks)") 48 | .font(.system(size:80, weight:.bold, design:.rounded)) 49 | .foregroundColor(.white) 50 | ) 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /06-states_bindings/06-states_bindings/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // 06-states_bindings 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 15/02/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct ContentView: View { 12 | 13 | @State private var isPlaying = false 14 | 15 | var body: some View { 16 | Button(action: { 17 | self.isPlaying.toggle() 18 | }){ 19 | Image(systemName:isPlaying ? "stop.circle.fill" : "play.circle.fill") 20 | .font(.system(size:100)) 21 | .foregroundColor(isPlaying ? .red : .blue) 22 | } 23 | } 24 | } 25 | 26 | struct ContentView_Previews: PreviewProvider { 27 | static var previews: some View { 28 | ContentView() 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /06-states_bindings/06-states_bindings/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /07-draw/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/07-draw/.DS_Store -------------------------------------------------------------------------------- /07-draw/07-draw.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /07-draw/07-draw.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /07-draw/07-draw/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // 07-draw 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 15/02/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | // Override point for customization after application launch. 18 | return true 19 | } 20 | 21 | // MARK: UISceneSession Lifecycle 22 | 23 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 24 | // Called when a new scene session is being created. 25 | // Use this method to select a configuration to create the new scene with. 26 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 27 | } 28 | 29 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 30 | // Called when the user discards a scene session. 31 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 32 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 33 | } 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /07-draw/07-draw/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /07-draw/07-draw/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /07-draw/07-draw/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /07-draw/07-draw/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // 07-draw 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 15/02/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct ContentView: View { 12 | var body: some View { 13 | Path(){ path in 14 | path.move(to: CGPoint(x: 30, y: 30)) 15 | path.addLine(to: CGPoint(x:230, y:30)) 16 | path.addLine(to: CGPoint(x:230, y:150)) 17 | path.addLine(to: CGPoint(x:30, y:150)) 18 | path.closeSubpath() 19 | } 20 | .stroke(Color.blue, lineWidth: 10) 21 | } 22 | } 23 | 24 | struct ContentView_Previews: PreviewProvider { 25 | static var previews: some View { 26 | ContentView() 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /07-draw/07-draw/DougnutView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DougnutView.swift 3 | // 07-draw 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 15/02/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct DougnutView: View { 12 | var body: some View { 13 | ZStack{ 14 | Circle() 15 | .trim(from: 0.0, to: 0.3) 16 | .stroke(Color(.brown), lineWidth: 60) 17 | 18 | Circle() 19 | .trim(from:0.30, to:0.5) 20 | .stroke(Color(.systemPink), lineWidth: 60) 21 | 22 | Circle() 23 | .trim(from:0.50, to:0.75) 24 | .stroke(Color(.orange), lineWidth: 60) 25 | 26 | Circle() 27 | .trim(from:0.75, to:1.00) 28 | .stroke(Color(.red), lineWidth: 70) 29 | .overlay( 30 | Text("25%") 31 | .font(.system(.title, design:.rounded)) 32 | .bold() 33 | .foregroundColor(.white) 34 | .offset(x:90, y:-90) 35 | ) 36 | 37 | } 38 | .frame(width:250, height:250) 39 | } 40 | } 41 | 42 | struct DougnutView_Previews: PreviewProvider { 43 | static var previews: some View { 44 | DougnutView() 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /07-draw/07-draw/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /07-draw/07-draw/ProgressIndicator.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ProgressIndicator.swift 3 | // 07-draw 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 15/02/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct ProgressIndicator: View { 12 | 13 | private var trackGradient = LinearGradient(gradient: Gradient(colors: [Color(red:50/255, green:150/255, blue:230/255), Color(red:70/255, green:180/255, blue:240/255)]), startPoint: .trailing, endPoint: .leading) 14 | var body: some View { 15 | 16 | ZStack{ 17 | Circle() 18 | .stroke(Color(.systemGray5), lineWidth: 10) 19 | .frame(width:200, height:200) 20 | 21 | Circle() 22 | .trim(from: 0, to: 0.65) 23 | .stroke(trackGradient, lineWidth: 20) 24 | .frame(width:200, height:200) 25 | .overlay(VStack{ 26 | Text("65%") 27 | .font(.system(size:60, weight:.bold, design:.rounded)) 28 | Text("Número de Pasos") 29 | .font(.system(.body, design:.rounded)) 30 | .bold().foregroundColor(Color(.systemTeal)) 31 | }) 32 | 33 | } 34 | 35 | } 36 | } 37 | 38 | struct ProgressIndicator_Previews: PreviewProvider { 39 | static var previews: some View { 40 | ProgressIndicator() 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /08-anims/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/08-anims/.DS_Store -------------------------------------------------------------------------------- /08-anims/08-anims.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /08-anims/08-anims.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /08-anims/08-anims/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // 08-anims 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 17/02/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | // Override point for customization after application launch. 18 | return true 19 | } 20 | 21 | // MARK: UISceneSession Lifecycle 22 | 23 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 24 | // Called when a new scene session is being created. 25 | // Use this method to select a configuration to create the new scene with. 26 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 27 | } 28 | 29 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 30 | // Called when the user discards a scene session. 31 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 32 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 33 | } 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /08-anims/08-anims/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /08-anims/08-anims/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /08-anims/08-anims/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /08-anims/08-anims/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // 08-anims 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 17/02/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct ContentView: View { 12 | 13 | @State private var buttonColorChanged = false 14 | @State private var iconColorChanged = false 15 | @State private var iconSizeChanged = false 16 | 17 | var body: some View { 18 | ZStack{ 19 | Circle() 20 | .frame(width: 180, height: 180) 21 | .foregroundColor(buttonColorChanged ? Color(.systemGray4) : .green) 22 | 23 | Image(systemName: "keyboard") 24 | .font(.system(size:80)) 25 | .foregroundColor(iconColorChanged ? .green : Color(.systemGray6)) 26 | .scaleEffect(iconSizeChanged ? 1.0 : 0.5) 27 | } 28 | //.animation(.spring(response: 0.5, dampingFraction: 0.1, blendDuration: 0.5)) 29 | .onTapGesture { 30 | withAnimation(.spring(response: 0.5, dampingFraction: 0.1, blendDuration: 0.5)) { 31 | self.buttonColorChanged.toggle() 32 | self.iconColorChanged.toggle() 33 | } 34 | 35 | self.iconSizeChanged.toggle() 36 | 37 | } 38 | } 39 | } 40 | 41 | struct ContentView_Previews: PreviewProvider { 42 | static var previews: some View { 43 | ContentView() 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /08-anims/08-anims/DotsLoadingView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DotsLoadingView.swift 3 | // 08-anims 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 18/02/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct DotsLoadingView: View { 12 | 13 | @State private var isLoading = false 14 | 15 | var body: some View { 16 | HStack{ 17 | ForEach(0...5, id: \.self){ index in 18 | Circle() 19 | .frame(width: 16, height: 16) 20 | .foregroundColor(Color.green) 21 | .scaleEffect(self.isLoading ? 0 : 1) 22 | .animation(Animation.linear(duration: 0.5).repeatForever().delay(Double(index)/6), value: self.isLoading) 23 | } 24 | }.onAppear(){ 25 | self.isLoading = true 26 | } 27 | } 28 | } 29 | 30 | struct DotsLoadingView_Previews: PreviewProvider { 31 | static var previews: some View { 32 | DotsLoadingView() 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /08-anims/08-anims/LoadingBarView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LoadingBarView.swift 3 | // 08-anims 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 18/02/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct LoadingBarView: View { 12 | 13 | @State private var isLoading = false 14 | 15 | var body: some View { 16 | ZStack{ 17 | Text("Cargando") 18 | .font(.system(.title, design: .rounded)) 19 | .bold() 20 | .offset(x: 0, y: -30) 21 | 22 | RoundedRectangle(cornerRadius: 4) 23 | .stroke(Color(.systemGray6), lineWidth: 5) 24 | .frame(width: 300, height: 4) 25 | 26 | RoundedRectangle(cornerRadius: 4) 27 | .stroke(Color.green, lineWidth: 5) 28 | .frame(width: 50, height: 4) 29 | .offset(x: isLoading ? 125 : -125, y: 0) 30 | .animation(Animation.linear(duration: 2).repeatForever(autoreverses: false), value:self.isLoading) 31 | .onAppear(){ 32 | self.isLoading = true 33 | } 34 | } 35 | } 36 | } 37 | 38 | struct LoadingBarView_Previews: PreviewProvider { 39 | static var previews: some View { 40 | LoadingBarView() 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /08-anims/08-anims/LoadingView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LoadingView.swift 3 | // 08-anims 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 18/02/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct LoadingView: View { 12 | 13 | @State private var isLoading = false 14 | 15 | var body: some View { 16 | ZStack{ 17 | Circle() 18 | .stroke(Color(.systemGray6), lineWidth: 16) 19 | .frame(width:150, height: 150) 20 | Circle() 21 | .trim(from: 0.0, to: 0.3) 22 | .stroke(Color.green, lineWidth: 8) 23 | .frame(width: 150, height: 150) 24 | .rotationEffect(Angle(degrees: isLoading ? 360 : 0)) 25 | .animation(Animation.linear(duration: 2).repeatForever(autoreverses: false), value:self.isLoading) 26 | .onAppear(){ 27 | self.isLoading = true 28 | } 29 | } 30 | } 31 | } 32 | 33 | struct LoadingView_Previews: PreviewProvider { 34 | static var previews: some View { 35 | LoadingView() 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /08-anims/08-anims/MorphView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MorphView.swift 3 | // 08-anims 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 18/02/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct MorphView: View { 12 | 13 | @State private var animBegin = false 14 | @State private var circle = false 15 | 16 | var body: some View { 17 | ZStack{ 18 | RoundedRectangle(cornerRadius: animBegin ? 30 : 10) 19 | .frame(width: animBegin ? 60 : 250, height: 60) 20 | .foregroundColor(animBegin ? .blue : .green) 21 | .overlay( 22 | Image(systemName: "keyboard") 23 | .font(.system(.largeTitle)) 24 | .foregroundColor(.white) 25 | .scaleEffect(circle ? 0.5 : 1.0) 26 | ) 27 | 28 | RoundedRectangle(cornerRadius: animBegin ? 40 : 20) 29 | .trim(from: 0, to: animBegin ? 0 : 1) 30 | .stroke(lineWidth: 8) 31 | .frame(width: animBegin ? 80 : 270, height: 80) 32 | .foregroundColor(animBegin ? .blue : .green) 33 | 34 | }.onTapGesture { 35 | withAnimation(Animation.spring()){ 36 | self.animBegin.toggle() 37 | } 38 | 39 | withAnimation(Animation.spring().repeatForever().delay(0.25)){ 40 | self.circle.toggle() 41 | } 42 | } 43 | } 44 | } 45 | 46 | struct MorphView_Previews: PreviewProvider { 47 | static var previews: some View { 48 | MorphView() 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /08-anims/08-anims/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /08-anims/08-anims/ProgressView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ProgressView.swift 3 | // 08-anims 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 18/02/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct ProgressView: View { 12 | 13 | @State private var progress: CGFloat = 0.0 14 | 15 | var body: some View { 16 | 17 | ZStack{ 18 | Text("\(Int(progress*100)) %") 19 | .font(.system(.title, design:.rounded)) 20 | .bold() 21 | 22 | Circle() 23 | .stroke(Color(.systemGray6), lineWidth: 12) 24 | .frame(width: 150, height: 150) 25 | 26 | Circle() 27 | .trim(from: 0, to: progress) 28 | .stroke(Color.green, lineWidth: 12) 29 | .frame(width: 150, height: 150) 30 | .rotationEffect(Angle(degrees: -90)) 31 | }.onAppear(){ 32 | Timer.scheduledTimer(withTimeInterval: 0.1, repeats: true) { timer in 33 | self.progress += 0.01 34 | if self.progress >= 1.0{ 35 | timer.invalidate() 36 | } 37 | } 38 | } 39 | } 40 | } 41 | 42 | struct ProgressView_Previews: PreviewProvider { 43 | static var previews: some View { 44 | ProgressView() 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /09-transitions/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/09-transitions/.DS_Store -------------------------------------------------------------------------------- /09-transitions/09-transitions.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /09-transitions/09-transitions.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /09-transitions/09-transitions/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // 09-transitions 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 18/02/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | // Override point for customization after application launch. 18 | return true 19 | } 20 | 21 | // MARK: UISceneSession Lifecycle 22 | 23 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 24 | // Called when a new scene session is being created. 25 | // Use this method to select a configuration to create the new scene with. 26 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 27 | } 28 | 29 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 30 | // Called when the user discards a scene session. 31 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 32 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 33 | } 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /09-transitions/09-transitions/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /09-transitions/09-transitions/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /09-transitions/09-transitions/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // 09-transitions 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 18/02/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct ContentView: View { 12 | 13 | @State private var showTranslation = false 14 | 15 | var body: some View { 16 | VStack{ 17 | Rectangle() 18 | .frame(width: 250, height: 250) 19 | .foregroundColor(.orange) 20 | .overlay( 21 | Text("Car") 22 | .font(.system(.largeTitle, design:.rounded)) 23 | .bold() 24 | .foregroundColor(.white) 25 | ) 26 | 27 | if showTranslation{ 28 | Rectangle() 29 | .frame(width: 250, height: 250) 30 | .foregroundColor(.purple) 31 | .overlay( 32 | Text("Coche") 33 | .font(.system(.largeTitle, design:.rounded)) 34 | .bold() 35 | .foregroundColor(.white) 36 | ) 37 | .transition(.asymmetric(insertion: .scale(scale: 0, anchor: .bottom), 38 | removal: .offset(x: -600, y: 0) 39 | ) 40 | ) 41 | } 42 | 43 | } 44 | .onTapGesture { 45 | withAnimation(Animation.spring()){ 46 | self.showTranslation.toggle() 47 | } 48 | } 49 | } 50 | } 51 | 52 | struct ContentView_Previews: PreviewProvider { 53 | static var previews: some View { 54 | ContentView() 55 | } 56 | } 57 | 58 | 59 | extension AnyTransition { 60 | static var offsetScaledOpacityOut: AnyTransition{ 61 | AnyTransition.offset(x: -700, y: 0) 62 | .combined(with: .scale) 63 | .combined(with: .opacity) 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /09-transitions/09-transitions/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /10-lists/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/10-lists/.DS_Store -------------------------------------------------------------------------------- /10-lists/10-lists.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /10-lists/10-lists.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /10-lists/10-lists/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/10-lists/10-lists/.DS_Store -------------------------------------------------------------------------------- /10-lists/10-lists/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // 10-lists 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 18/02/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | // Override point for customization after application launch. 18 | return true 19 | } 20 | 21 | // MARK: UISceneSession Lifecycle 22 | 23 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 24 | // Called when a new scene session is being created. 25 | // Use this method to select a configuration to create the new scene with. 26 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 27 | } 28 | 29 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 30 | // Called when the user discards a scene session. 31 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 32 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 33 | } 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /10-lists/10-lists/Assets.xcassets/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/10-lists/10-lists/Assets.xcassets/.DS_Store -------------------------------------------------------------------------------- /10-lists/10-lists/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /10-lists/10-lists/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /10-lists/10-lists/Assets.xcassets/maths.imageset/2521460_3ad6_2-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/10-lists/10-lists/Assets.xcassets/maths.imageset/2521460_3ad6_2-2.jpg -------------------------------------------------------------------------------- /10-lists/10-lists/Assets.xcassets/maths.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2521460_3ad6_2-2.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /10-lists/10-lists/Assets.xcassets/ml_az.imageset/2241862_0a58.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/10-lists/10-lists/Assets.xcassets/ml_az.imageset/2241862_0a58.jpg -------------------------------------------------------------------------------- /10-lists/10-lists/Assets.xcassets/ml_az.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2241862_0a58.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /10-lists/10-lists/Assets.xcassets/python.imageset/2770738_e3ad.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/10-lists/10-lists/Assets.xcassets/python.imageset/2770738_e3ad.jpg -------------------------------------------------------------------------------- /10-lists/10-lists/Assets.xcassets/python.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2770738_e3ad.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /10-lists/10-lists/Assets.xcassets/selectividad.imageset/2647510_7b8f-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/10-lists/10-lists/Assets.xcassets/selectividad.imageset/2647510_7b8f-2.jpg -------------------------------------------------------------------------------- /10-lists/10-lists/Assets.xcassets/selectividad.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2647510_7b8f-2.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /10-lists/10-lists/Assets.xcassets/swift.imageset/2397342_68bf_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/10-lists/10-lists/Assets.xcassets/swift.imageset/2397342_68bf_2.jpg -------------------------------------------------------------------------------- /10-lists/10-lists/Assets.xcassets/swift.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2397342_68bf_2.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /10-lists/10-lists/Assets.xcassets/tensorflow2.imageset/2440222_929d_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/10-lists/10-lists/Assets.xcassets/tensorflow2.imageset/2440222_929d_2.jpg -------------------------------------------------------------------------------- /10-lists/10-lists/Assets.xcassets/tensorflow2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2440222_929d_2.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /10-lists/10-lists/Assets.xcassets/unrealengine.imageset/1910458_3e7f_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/10-lists/10-lists/Assets.xcassets/unrealengine.imageset/1910458_3e7f_3.jpg -------------------------------------------------------------------------------- /10-lists/10-lists/Assets.xcassets/unrealengine.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "1910458_3e7f_3.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /10-lists/10-lists/Assets.xcassets/videogames.imageset/2438730_59f7_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/10-lists/10-lists/Assets.xcassets/videogames.imageset/2438730_59f7_3.jpg -------------------------------------------------------------------------------- /10-lists/10-lists/Assets.xcassets/videogames.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2438730_59f7_3.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /10-lists/10-lists/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /10-lists/10-lists/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /11-navigation/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/11-navigation/.DS_Store -------------------------------------------------------------------------------- /11-navigation/11-navigation.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /11-navigation/11-navigation.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /11-navigation/11-navigation/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/11-navigation/11-navigation/.DS_Store -------------------------------------------------------------------------------- /11-navigation/11-navigation/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // 11-navigation 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 20/02/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | // Override point for customization after application launch. 18 | return true 19 | } 20 | 21 | // MARK: UISceneSession Lifecycle 22 | 23 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 24 | // Called when a new scene session is being created. 25 | // Use this method to select a configuration to create the new scene with. 26 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 27 | } 28 | 29 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 30 | // Called when the user discards a scene session. 31 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 32 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 33 | } 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /11-navigation/11-navigation/Assets.xcassets/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/11-navigation/11-navigation/Assets.xcassets/.DS_Store -------------------------------------------------------------------------------- /11-navigation/11-navigation/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /11-navigation/11-navigation/Assets.xcassets/maths.imageset/2521460_3ad6_2-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/11-navigation/11-navigation/Assets.xcassets/maths.imageset/2521460_3ad6_2-2.jpg -------------------------------------------------------------------------------- /11-navigation/11-navigation/Assets.xcassets/maths.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2521460_3ad6_2-2.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /11-navigation/11-navigation/Assets.xcassets/ml_az.imageset/2241862_0a58.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/11-navigation/11-navigation/Assets.xcassets/ml_az.imageset/2241862_0a58.jpg -------------------------------------------------------------------------------- /11-navigation/11-navigation/Assets.xcassets/ml_az.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2241862_0a58.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /11-navigation/11-navigation/Assets.xcassets/python.imageset/2770738_e3ad.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/11-navigation/11-navigation/Assets.xcassets/python.imageset/2770738_e3ad.jpg -------------------------------------------------------------------------------- /11-navigation/11-navigation/Assets.xcassets/python.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2770738_e3ad.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /11-navigation/11-navigation/Assets.xcassets/selectividad.imageset/2647510_7b8f-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/11-navigation/11-navigation/Assets.xcassets/selectividad.imageset/2647510_7b8f-2.jpg -------------------------------------------------------------------------------- /11-navigation/11-navigation/Assets.xcassets/selectividad.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2647510_7b8f-2.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /11-navigation/11-navigation/Assets.xcassets/swift.imageset/2397342_68bf_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/11-navigation/11-navigation/Assets.xcassets/swift.imageset/2397342_68bf_2.jpg -------------------------------------------------------------------------------- /11-navigation/11-navigation/Assets.xcassets/swift.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2397342_68bf_2.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /11-navigation/11-navigation/Assets.xcassets/tensorflow2.imageset/2440222_929d_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/11-navigation/11-navigation/Assets.xcassets/tensorflow2.imageset/2440222_929d_2.jpg -------------------------------------------------------------------------------- /11-navigation/11-navigation/Assets.xcassets/tensorflow2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2440222_929d_2.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /11-navigation/11-navigation/Assets.xcassets/unrealengine.imageset/1910458_3e7f_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/11-navigation/11-navigation/Assets.xcassets/unrealengine.imageset/1910458_3e7f_3.jpg -------------------------------------------------------------------------------- /11-navigation/11-navigation/Assets.xcassets/unrealengine.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "1910458_3e7f_3.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /11-navigation/11-navigation/Assets.xcassets/videogames.imageset/2438730_59f7_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/11-navigation/11-navigation/Assets.xcassets/videogames.imageset/2438730_59f7_3.jpg -------------------------------------------------------------------------------- /11-navigation/11-navigation/Assets.xcassets/videogames.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2438730_59f7_3.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /11-navigation/11-navigation/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /11-navigation/11-navigation/DetailView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DetailView.swift 3 | // 11-navigation 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 20/02/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct DetailView: View { 12 | 13 | @Environment(\.presentationMode) var presentationMode 14 | 15 | var course: Course 16 | 17 | var body: some View { 18 | ScrollView{ 19 | VStack{ 20 | Image(course.image) 21 | .resizable() 22 | .aspectRatio(contentMode: .fit) 23 | //.frame(height:300) 24 | //.clipped() 25 | 26 | Text(course.name) 27 | .font(.system(.title, design: .rounded)) 28 | .fontWeight(.black) 29 | .multilineTextAlignment(.center) 30 | .frame(width:300) 31 | .lineLimit(3) 32 | 33 | Spacer() 34 | } 35 | } 36 | //.navigationBarTitle("", displayMode: .inline) 37 | .edgesIgnoringSafeArea(.top) 38 | .navigationBarBackButtonHidden(true) 39 | .navigationBarItems(leading: 40 | Button(action: { 41 | //Navegar a la pantalla previa 42 | self.presentationMode.wrappedValue.dismiss() 43 | }, label: { 44 | Image(systemName: "arrow.left.circle.fill") 45 | .font(.title) 46 | .foregroundColor(.white) 47 | }) 48 | ) 49 | } 50 | } 51 | 52 | struct DetailView_Previews: PreviewProvider { 53 | static var previews: some View { 54 | DetailView(course: Course(name: "Curso completo de iOS 13 con Swift UI", image: "swift")) 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /11-navigation/11-navigation/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /12-modals/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/12-modals/.DS_Store -------------------------------------------------------------------------------- /12-modals/12-modals.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /12-modals/12-modals.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /12-modals/12-modals/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/12-modals/12-modals/.DS_Store -------------------------------------------------------------------------------- /12-modals/12-modals/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // 12-modals 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 20/02/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | // Override point for customization after application launch. 18 | return true 19 | } 20 | 21 | // MARK: UISceneSession Lifecycle 22 | 23 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 24 | // Called when a new scene session is being created. 25 | // Use this method to select a configuration to create the new scene with. 26 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 27 | } 28 | 29 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 30 | // Called when the user discards a scene session. 31 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 32 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 33 | } 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /12-modals/12-modals/Assets.xcassets/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/12-modals/12-modals/Assets.xcassets/.DS_Store -------------------------------------------------------------------------------- /12-modals/12-modals/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /12-modals/12-modals/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /12-modals/12-modals/Assets.xcassets/maths.imageset/2521460_3ad6_2-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/12-modals/12-modals/Assets.xcassets/maths.imageset/2521460_3ad6_2-2.jpg -------------------------------------------------------------------------------- /12-modals/12-modals/Assets.xcassets/maths.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2521460_3ad6_2-2.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /12-modals/12-modals/Assets.xcassets/ml_az.imageset/2241862_0a58.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/12-modals/12-modals/Assets.xcassets/ml_az.imageset/2241862_0a58.jpg -------------------------------------------------------------------------------- /12-modals/12-modals/Assets.xcassets/ml_az.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2241862_0a58.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /12-modals/12-modals/Assets.xcassets/python.imageset/2770738_e3ad.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/12-modals/12-modals/Assets.xcassets/python.imageset/2770738_e3ad.jpg -------------------------------------------------------------------------------- /12-modals/12-modals/Assets.xcassets/python.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2770738_e3ad.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /12-modals/12-modals/Assets.xcassets/selectividad.imageset/2647510_7b8f-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/12-modals/12-modals/Assets.xcassets/selectividad.imageset/2647510_7b8f-2.jpg -------------------------------------------------------------------------------- /12-modals/12-modals/Assets.xcassets/selectividad.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2647510_7b8f-2.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /12-modals/12-modals/Assets.xcassets/swift.imageset/2397342_68bf_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/12-modals/12-modals/Assets.xcassets/swift.imageset/2397342_68bf_2.jpg -------------------------------------------------------------------------------- /12-modals/12-modals/Assets.xcassets/swift.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2397342_68bf_2.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /12-modals/12-modals/Assets.xcassets/tensorflow2.imageset/2440222_929d_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/12-modals/12-modals/Assets.xcassets/tensorflow2.imageset/2440222_929d_2.jpg -------------------------------------------------------------------------------- /12-modals/12-modals/Assets.xcassets/tensorflow2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2440222_929d_2.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /12-modals/12-modals/Assets.xcassets/unrealengine.imageset/1910458_3e7f_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/12-modals/12-modals/Assets.xcassets/unrealengine.imageset/1910458_3e7f_3.jpg -------------------------------------------------------------------------------- /12-modals/12-modals/Assets.xcassets/unrealengine.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "1910458_3e7f_3.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /12-modals/12-modals/Assets.xcassets/videogames.imageset/2438730_59f7_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/12-modals/12-modals/Assets.xcassets/videogames.imageset/2438730_59f7_3.jpg -------------------------------------------------------------------------------- /12-modals/12-modals/Assets.xcassets/videogames.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2438730_59f7_3.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /12-modals/12-modals/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /12-modals/12-modals/Model/Course.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Course.swift 3 | // 12-modals 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 24/02/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | struct Course: Identifiable { 12 | var id = UUID() 13 | var name: String 14 | var image: String 15 | var feature: Bool = false 16 | var description: String = "" 17 | } 18 | -------------------------------------------------------------------------------- /12-modals/12-modals/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /13-forms/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/13-forms/.DS_Store -------------------------------------------------------------------------------- /13-forms/13-forms.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /13-forms/13-forms.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /13-forms/13-forms/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/13-forms/13-forms/.DS_Store -------------------------------------------------------------------------------- /13-forms/13-forms/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // 13-forms 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 24/02/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | // Override point for customization after application launch. 18 | return true 19 | } 20 | 21 | // MARK: UISceneSession Lifecycle 22 | 23 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 24 | // Called when a new scene session is being created. 25 | // Use this method to select a configuration to create the new scene with. 26 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 27 | } 28 | 29 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 30 | // Called when the user discards a scene session. 31 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 32 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 33 | } 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /13-forms/13-forms/Assets.xcassets/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/13-forms/13-forms/Assets.xcassets/.DS_Store -------------------------------------------------------------------------------- /13-forms/13-forms/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /13-forms/13-forms/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /13-forms/13-forms/Assets.xcassets/maths.imageset/2521460_3ad6_2-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/13-forms/13-forms/Assets.xcassets/maths.imageset/2521460_3ad6_2-2.jpg -------------------------------------------------------------------------------- /13-forms/13-forms/Assets.xcassets/maths.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2521460_3ad6_2-2.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /13-forms/13-forms/Assets.xcassets/ml_az.imageset/2241862_0a58.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/13-forms/13-forms/Assets.xcassets/ml_az.imageset/2241862_0a58.jpg -------------------------------------------------------------------------------- /13-forms/13-forms/Assets.xcassets/ml_az.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2241862_0a58.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /13-forms/13-forms/Assets.xcassets/python.imageset/2770738_e3ad.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/13-forms/13-forms/Assets.xcassets/python.imageset/2770738_e3ad.jpg -------------------------------------------------------------------------------- /13-forms/13-forms/Assets.xcassets/python.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2770738_e3ad.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /13-forms/13-forms/Assets.xcassets/selectividad.imageset/2647510_7b8f-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/13-forms/13-forms/Assets.xcassets/selectividad.imageset/2647510_7b8f-2.jpg -------------------------------------------------------------------------------- /13-forms/13-forms/Assets.xcassets/selectividad.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2647510_7b8f-2.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /13-forms/13-forms/Assets.xcassets/swift.imageset/2397342_68bf_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/13-forms/13-forms/Assets.xcassets/swift.imageset/2397342_68bf_2.jpg -------------------------------------------------------------------------------- /13-forms/13-forms/Assets.xcassets/swift.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2397342_68bf_2.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /13-forms/13-forms/Assets.xcassets/tensorflow2.imageset/2440222_929d_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/13-forms/13-forms/Assets.xcassets/tensorflow2.imageset/2440222_929d_2.jpg -------------------------------------------------------------------------------- /13-forms/13-forms/Assets.xcassets/tensorflow2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2440222_929d_2.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /13-forms/13-forms/Assets.xcassets/unrealengine.imageset/1910458_3e7f_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/13-forms/13-forms/Assets.xcassets/unrealengine.imageset/1910458_3e7f_3.jpg -------------------------------------------------------------------------------- /13-forms/13-forms/Assets.xcassets/unrealengine.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "1910458_3e7f_3.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /13-forms/13-forms/Assets.xcassets/videogames.imageset/2438730_59f7_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/13-forms/13-forms/Assets.xcassets/videogames.imageset/2438730_59f7_3.jpg -------------------------------------------------------------------------------- /13-forms/13-forms/Assets.xcassets/videogames.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2438730_59f7_3.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /13-forms/13-forms/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /13-forms/13-forms/Course.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Course.swift 3 | // 13-forms 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 24/02/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | struct Course: Identifiable { 12 | var id = UUID() 13 | var name: String 14 | var image: String 15 | var type: String 16 | var priceLevel: Int 17 | var featured: Bool = false 18 | var purchased: Bool = false 19 | } 20 | -------------------------------------------------------------------------------- /13-forms/13-forms/DetailView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DetailView.swift 3 | // 11-navigation 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 20/02/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct DetailView: View { 12 | 13 | @Environment(\.presentationMode) var presentationMode 14 | 15 | var course: Course 16 | 17 | var body: some View { 18 | ScrollView{ 19 | VStack{ 20 | Image(course.image) 21 | .resizable() 22 | .aspectRatio(contentMode: .fit) 23 | //.frame(height:300) 24 | //.clipped() 25 | 26 | Text(course.name) 27 | .font(.system(.title, design: .rounded)) 28 | .fontWeight(.black) 29 | .multilineTextAlignment(.center) 30 | .frame(width:300) 31 | .lineLimit(3) 32 | 33 | Spacer() 34 | } 35 | } 36 | //.navigationBarTitle("", displayMode: .inline) 37 | .edgesIgnoringSafeArea(.top) 38 | .navigationBarBackButtonHidden(true) 39 | .navigationBarItems(leading: 40 | Button(action: { 41 | //Navegar a la pantalla previa 42 | self.presentationMode.wrappedValue.dismiss() 43 | }, label: { 44 | Image(systemName: "arrow.left.circle.fill") 45 | .font(.title) 46 | .foregroundColor(.white) 47 | }) 48 | ) 49 | } 50 | } 51 | 52 | struct DetailView_Previews: PreviewProvider { 53 | static var previews: some View { 54 | DetailView(course: Course(name: "Curso completo de iOS 13 con Swift UI", image: "swift", type: "Desarrollo de Apps", priceLevel: 1)) 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /13-forms/13-forms/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /13-forms/13-forms/SettingsFactory.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SettingsFactory.swift 3 | // 13-forms 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 25/02/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import Combine 11 | 12 | final class SettingsFactory: ObservableObject{ 13 | 14 | @Published var defaults: UserDefaults 15 | 16 | init(defaults: UserDefaults = .standard) { 17 | self.defaults = defaults 18 | 19 | defaults.register(defaults: [ 20 | "app.view.settings.order": 0, 21 | "app.view.settings.showPurchasedOnly": false, 22 | "app.view.settings.maxPrice": 5 23 | ]) 24 | } 25 | 26 | 27 | var order: SortingOrderType{ 28 | get{ 29 | SortingOrderType(type: defaults.integer(forKey: "app.view.settings.order")) 30 | } 31 | set{ 32 | defaults.set(newValue.rawValue, forKey: "app.view.settings.order") 33 | } 34 | } 35 | var showPurchasedOnly: Bool{ 36 | get{ 37 | defaults.bool(forKey: "app.view.settings.showPurchasedOnly") 38 | } 39 | set{ 40 | defaults.set(newValue, forKey: "app.view.settings.showPurchasedOnly") 41 | } 42 | } 43 | var maxPrice: Int{ 44 | get{ 45 | defaults.integer(forKey: "app.view.settings.maxPrice") 46 | } 47 | set{ 48 | defaults.set(newValue, forKey: "app.view.settings.maxPrice") 49 | } 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /13-forms/13-forms/SortingOrderType.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SortingOrderType.swift 3 | // 13-forms 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 25/02/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | enum SortingOrderType: Int, CaseIterable { 11 | 12 | case alphabetical = 0 13 | case featured = 1 14 | case purchased = 2 15 | 16 | init(type: Int) { 17 | switch type { 18 | case 0: 19 | self = .alphabetical 20 | case 1: 21 | self = .featured 22 | case 2: 23 | self = .purchased 24 | default: 25 | self = .alphabetical 26 | } 27 | } 28 | 29 | var description : String { 30 | switch self { 31 | case .alphabetical: 32 | return "Alfabéticamente" 33 | case .featured: 34 | return "Los favoritos al inicio" 35 | case .purchased: 36 | return "Los comprados al inicio" 37 | } 38 | } 39 | 40 | 41 | func predicateSort() -> ((Course, Course) -> Bool){ 42 | switch self { 43 | case .alphabetical: 44 | return {$0.name < $1.name} 45 | case .featured: 46 | return {$0.featured && !$1.featured} 47 | case .purchased: 48 | return {$0.purchased && !$1.purchased} 49 | } 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /14-sign_up/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/14-sign_up/.DS_Store -------------------------------------------------------------------------------- /14-sign_up/14-sign_up.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /14-sign_up/14-sign_up.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /14-sign_up/14-sign_up/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // 14-sign_up 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 26/02/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | // Override point for customization after application launch. 18 | return true 19 | } 20 | 21 | // MARK: UISceneSession Lifecycle 22 | 23 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 24 | // Called when a new scene session is being created. 25 | // Use this method to select a configuration to create the new scene with. 26 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 27 | } 28 | 29 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 30 | // Called when the user discards a scene session. 31 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 32 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 33 | } 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /14-sign_up/14-sign_up/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /14-sign_up/14-sign_up/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /14-sign_up/14-sign_up/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /14-sign_up/14-sign_up/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /15-gestos/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/15-gestos/.DS_Store -------------------------------------------------------------------------------- /15-gestos/15-gestos.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /15-gestos/15-gestos.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /15-gestos/15-gestos/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // 15-gestos 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 27/02/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | // Override point for customization after application launch. 18 | return true 19 | } 20 | 21 | // MARK: UISceneSession Lifecycle 22 | 23 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 24 | // Called when a new scene session is being created. 25 | // Use this method to select a configuration to create the new scene with. 26 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 27 | } 28 | 29 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 30 | // Called when the user discards a scene session. 31 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 32 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 33 | } 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /15-gestos/15-gestos/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /15-gestos/15-gestos/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /15-gestos/15-gestos/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /15-gestos/15-gestos/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // 15-gestos 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 27/02/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct ContentView: View { 12 | 13 | @State private var hasBeenPressed = false 14 | 15 | @GestureState private var hasBeenLongPressed = false 16 | 17 | var body: some View { 18 | Image(systemName: "paperclip.circle.fill") 19 | .font(.system(size:150)) 20 | .foregroundColor(.purple) 21 | .opacity(hasBeenLongPressed ? 0.5 : 1.0) 22 | .scaleEffect(hasBeenPressed ? 2.0 : 1.0) 23 | .animation(.easeIn, value: hasBeenPressed) 24 | .gesture( 25 | LongPressGesture(minimumDuration: 2.0) 26 | .updating($hasBeenLongPressed){ (value, state, transaction) in 27 | state = value 28 | } 29 | .onEnded{ _ in 30 | self.hasBeenPressed.toggle() 31 | } 32 | ) 33 | } 34 | } 35 | 36 | struct ContentView_Previews: PreviewProvider { 37 | static var previews: some View { 38 | ContentView() 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /15-gestos/15-gestos/DragView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DragView.swift 3 | // 15-gestos 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 27/02/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct DragView: View { 12 | 13 | 14 | @GestureState private var dragState = DragState.none 15 | //Gestos de arrastre 16 | @State private var position = CGSize.zero 17 | 18 | var body: some View { 19 | DraggableView(){ 20 | Text("✈️") 21 | .font(.system(size:200)) 22 | } 23 | } 24 | } 25 | 26 | struct DragView_Previews: PreviewProvider { 27 | static var previews: some View { 28 | DragView() 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /15-gestos/15-gestos/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /P1-ExpandableBottomSheet/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/P1-ExpandableBottomSheet/.DS_Store -------------------------------------------------------------------------------- /P1-ExpandableBottomSheet/P1-ExpandableBottomSheet.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /P1-ExpandableBottomSheet/P1-ExpandableBottomSheet.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /P1-ExpandableBottomSheet/P1-ExpandableBottomSheet/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // P1-ExpandableBottomSheet 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 01/03/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | // Override point for customization after application launch. 18 | return true 19 | } 20 | 21 | // MARK: UISceneSession Lifecycle 22 | 23 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 24 | // Called when a new scene session is being created. 25 | // Use this method to select a configuration to create the new scene with. 26 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 27 | } 28 | 29 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 30 | // Called when the user discards a scene session. 31 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 32 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 33 | } 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /P1-ExpandableBottomSheet/P1-ExpandableBottomSheet/Assets.xcassets/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/P1-ExpandableBottomSheet/P1-ExpandableBottomSheet/Assets.xcassets/.DS_Store -------------------------------------------------------------------------------- /P1-ExpandableBottomSheet/P1-ExpandableBottomSheet/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /P1-ExpandableBottomSheet/P1-ExpandableBottomSheet/Assets.xcassets/maths.imageset/2521460_3ad6_2-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/P1-ExpandableBottomSheet/P1-ExpandableBottomSheet/Assets.xcassets/maths.imageset/2521460_3ad6_2-2.jpg -------------------------------------------------------------------------------- /P1-ExpandableBottomSheet/P1-ExpandableBottomSheet/Assets.xcassets/maths.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2521460_3ad6_2-2.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /P1-ExpandableBottomSheet/P1-ExpandableBottomSheet/Assets.xcassets/ml_az.imageset/2241862_0a58.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/P1-ExpandableBottomSheet/P1-ExpandableBottomSheet/Assets.xcassets/ml_az.imageset/2241862_0a58.jpg -------------------------------------------------------------------------------- /P1-ExpandableBottomSheet/P1-ExpandableBottomSheet/Assets.xcassets/ml_az.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2241862_0a58.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /P1-ExpandableBottomSheet/P1-ExpandableBottomSheet/Assets.xcassets/python.imageset/2770738_e3ad.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/P1-ExpandableBottomSheet/P1-ExpandableBottomSheet/Assets.xcassets/python.imageset/2770738_e3ad.jpg -------------------------------------------------------------------------------- /P1-ExpandableBottomSheet/P1-ExpandableBottomSheet/Assets.xcassets/python.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2770738_e3ad.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /P1-ExpandableBottomSheet/P1-ExpandableBottomSheet/Assets.xcassets/selectividad.imageset/2647510_7b8f-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/P1-ExpandableBottomSheet/P1-ExpandableBottomSheet/Assets.xcassets/selectividad.imageset/2647510_7b8f-2.jpg -------------------------------------------------------------------------------- /P1-ExpandableBottomSheet/P1-ExpandableBottomSheet/Assets.xcassets/selectividad.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2647510_7b8f-2.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /P1-ExpandableBottomSheet/P1-ExpandableBottomSheet/Assets.xcassets/swift.imageset/2397342_68bf_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/P1-ExpandableBottomSheet/P1-ExpandableBottomSheet/Assets.xcassets/swift.imageset/2397342_68bf_2.jpg -------------------------------------------------------------------------------- /P1-ExpandableBottomSheet/P1-ExpandableBottomSheet/Assets.xcassets/swift.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2397342_68bf_2.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /P1-ExpandableBottomSheet/P1-ExpandableBottomSheet/Assets.xcassets/tensorflow2.imageset/2440222_929d_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/P1-ExpandableBottomSheet/P1-ExpandableBottomSheet/Assets.xcassets/tensorflow2.imageset/2440222_929d_2.jpg -------------------------------------------------------------------------------- /P1-ExpandableBottomSheet/P1-ExpandableBottomSheet/Assets.xcassets/tensorflow2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2440222_929d_2.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /P1-ExpandableBottomSheet/P1-ExpandableBottomSheet/Assets.xcassets/unrealengine.imageset/1910458_3e7f_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/P1-ExpandableBottomSheet/P1-ExpandableBottomSheet/Assets.xcassets/unrealengine.imageset/1910458_3e7f_3.jpg -------------------------------------------------------------------------------- /P1-ExpandableBottomSheet/P1-ExpandableBottomSheet/Assets.xcassets/unrealengine.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "1910458_3e7f_3.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /P1-ExpandableBottomSheet/P1-ExpandableBottomSheet/Assets.xcassets/videogames.imageset/2438730_59f7_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/P1-ExpandableBottomSheet/P1-ExpandableBottomSheet/Assets.xcassets/videogames.imageset/2438730_59f7_3.jpg -------------------------------------------------------------------------------- /P1-ExpandableBottomSheet/P1-ExpandableBottomSheet/Assets.xcassets/videogames.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2438730_59f7_3.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /P1-ExpandableBottomSheet/P1-ExpandableBottomSheet/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /P1-ExpandableBottomSheet/P1-ExpandableBottomSheet/DragState.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DragState.swift 3 | // P1-ExpandableBottomSheet 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 02/03/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import CoreGraphics 11 | 12 | enum DragState { 13 | case none 14 | case pressing 15 | case dragging(translation: CGSize) 16 | 17 | var translation: CGSize{ 18 | switch self { 19 | case .none, .pressing: 20 | return .zero 21 | case .dragging(let translation): 22 | return translation 23 | } 24 | } 25 | 26 | var isPressing: Bool{ 27 | switch self { 28 | case .pressing, .dragging: 29 | return true 30 | case .none: 31 | return false 32 | } 33 | } 34 | 35 | var isDragging: Bool { 36 | switch self { 37 | case .dragging: 38 | return true 39 | default: 40 | return false 41 | } 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /P1-ExpandableBottomSheet/P1-ExpandableBottomSheet/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /P2-Tinder/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/P2-Tinder/.DS_Store -------------------------------------------------------------------------------- /P2-Tinder/P2-Tinder.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /P2-Tinder/P2-Tinder.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /P2-Tinder/P2-Tinder/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // P2-Tinder 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 03/03/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | // Override point for customization after application launch. 18 | return true 19 | } 20 | 21 | // MARK: UISceneSession Lifecycle 22 | 23 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 24 | // Called when a new scene session is being created. 25 | // Use this method to select a configuration to create the new scene with. 26 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 27 | } 28 | 29 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 30 | // Called when the user discards a scene session. 31 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 32 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 33 | } 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /P2-Tinder/P2-Tinder/Assets.xcassets/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/P2-Tinder/P2-Tinder/Assets.xcassets/.DS_Store -------------------------------------------------------------------------------- /P2-Tinder/P2-Tinder/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /P2-Tinder/P2-Tinder/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /P2-Tinder/P2-Tinder/Assets.xcassets/maths.imageset/2521460_3ad6_2-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/P2-Tinder/P2-Tinder/Assets.xcassets/maths.imageset/2521460_3ad6_2-2.jpg -------------------------------------------------------------------------------- /P2-Tinder/P2-Tinder/Assets.xcassets/maths.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2521460_3ad6_2-2.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /P2-Tinder/P2-Tinder/Assets.xcassets/ml_az.imageset/2241862_0a58.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/P2-Tinder/P2-Tinder/Assets.xcassets/ml_az.imageset/2241862_0a58.jpg -------------------------------------------------------------------------------- /P2-Tinder/P2-Tinder/Assets.xcassets/ml_az.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2241862_0a58.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /P2-Tinder/P2-Tinder/Assets.xcassets/python.imageset/2770738_e3ad.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/P2-Tinder/P2-Tinder/Assets.xcassets/python.imageset/2770738_e3ad.jpg -------------------------------------------------------------------------------- /P2-Tinder/P2-Tinder/Assets.xcassets/python.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2770738_e3ad.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /P2-Tinder/P2-Tinder/Assets.xcassets/selectividad.imageset/2647510_7b8f-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/P2-Tinder/P2-Tinder/Assets.xcassets/selectividad.imageset/2647510_7b8f-2.jpg -------------------------------------------------------------------------------- /P2-Tinder/P2-Tinder/Assets.xcassets/selectividad.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2647510_7b8f-2.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /P2-Tinder/P2-Tinder/Assets.xcassets/swift.imageset/2397342_68bf_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/P2-Tinder/P2-Tinder/Assets.xcassets/swift.imageset/2397342_68bf_2.jpg -------------------------------------------------------------------------------- /P2-Tinder/P2-Tinder/Assets.xcassets/swift.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2397342_68bf_2.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /P2-Tinder/P2-Tinder/Assets.xcassets/tensorflow2.imageset/2440222_929d_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/P2-Tinder/P2-Tinder/Assets.xcassets/tensorflow2.imageset/2440222_929d_2.jpg -------------------------------------------------------------------------------- /P2-Tinder/P2-Tinder/Assets.xcassets/tensorflow2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2440222_929d_2.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /P2-Tinder/P2-Tinder/Assets.xcassets/unrealengine.imageset/1910458_3e7f_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/P2-Tinder/P2-Tinder/Assets.xcassets/unrealengine.imageset/1910458_3e7f_3.jpg -------------------------------------------------------------------------------- /P2-Tinder/P2-Tinder/Assets.xcassets/unrealengine.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "1910458_3e7f_3.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /P2-Tinder/P2-Tinder/Assets.xcassets/videogames.imageset/2438730_59f7_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/P2-Tinder/P2-Tinder/Assets.xcassets/videogames.imageset/2438730_59f7_3.jpg -------------------------------------------------------------------------------- /P2-Tinder/P2-Tinder/Assets.xcassets/videogames.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2438730_59f7_3.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /P2-Tinder/P2-Tinder/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /P2-Tinder/P2-Tinder/CardView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CardView.swift 3 | // P2-Tinder 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 03/03/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct CardView: View, Identifiable { 12 | 13 | let id = UUID() 14 | 15 | let course : Course 16 | 17 | var body: some View { 18 | Image(course.image) 19 | .resizable() 20 | .scaledToFill() 21 | .frame(minWidth: 0, maxWidth: .infinity) 22 | .cornerRadius(20) 23 | .padding(.horizontal, 20) 24 | .overlay( 25 | VStack{ 26 | Text(course.name) 27 | .font(.system(.title, design: .rounded)) 28 | .fontWeight(.bold) 29 | .padding(.horizontal, 30) 30 | .padding(.vertical, 20) 31 | .background(Color.white) 32 | .cornerRadius(20) 33 | }.padding([.top, .horizontal], 50), 34 | alignment: .top 35 | 36 | ) 37 | } 38 | } 39 | 40 | struct CardView_Previews: PreviewProvider { 41 | static var previews: some View { 42 | CardView(course: courses[0]) 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /P2-Tinder/P2-Tinder/Course.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Course.swift 3 | // P2-Tinder 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 03/03/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | struct Course { 11 | var name: String 12 | var image: String 13 | } 14 | 15 | #if DEBUG 16 | var courses: [Course] = [ 17 | Course(name: "Probabilidad y Variables Aleatorias", image: "maths"), 18 | Course(name: "Machine Learning de la A a la Z", image: "ml_az"), 19 | Course(name: "Curso completo de Sage", image: "python"), 20 | Course(name: "Aprueba la Selectividad", image: "selectividad"), 21 | Course(name: "Curso de Swift UI e iOS 13", image: "swift"), 22 | Course(name: "Tensorflow 2 al completo", image: "tensorflow2"), 23 | Course(name: "Curso de Unreal Engine", image: "unrealengine"), 24 | Course(name: "Curso de Unity 2019", image: "videogames") 25 | ] 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /P2-Tinder/P2-Tinder/DragState.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DragState.swift 3 | // P2-Tinder 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 03/03/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import CoreGraphics 11 | 12 | enum DragState { 13 | case none 14 | case pressing 15 | case dragging(translation: CGSize) 16 | 17 | var translation: CGSize{ 18 | switch self { 19 | case .none, .pressing: 20 | return .zero 21 | case .dragging(let translation): 22 | return translation 23 | } 24 | } 25 | 26 | var isPressing: Bool{ 27 | switch self { 28 | case .pressing, .dragging: 29 | return true 30 | case .none: 31 | return false 32 | } 33 | } 34 | 35 | var isDragging: Bool { 36 | switch self { 37 | case .dragging: 38 | return true 39 | default: 40 | return false 41 | } 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /P2-Tinder/P2-Tinder/Extesions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Extesions.swift 3 | // P2-Tinder 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 03/03/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import SwiftUI 11 | 12 | extension AnyTransition{ 13 | 14 | static var trailingBottomAtRemoval: AnyTransition{ 15 | AnyTransition.asymmetric(insertion: .identity, 16 | removal: AnyTransition 17 | .move(edge: .trailing) 18 | .combined(with: .move(edge: .bottom))) 19 | } 20 | 21 | 22 | static var leadingBottomAtRemoval: AnyTransition{ 23 | AnyTransition.asymmetric(insertion: .identity, 24 | removal: AnyTransition 25 | .move(edge: .leading) 26 | .combined(with: .move(edge: .bottom))) 27 | } 28 | 29 | //TODO: definir leadingTop at removal / trailingTop at removal 30 | } 31 | -------------------------------------------------------------------------------- /P2-Tinder/P2-Tinder/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /P3-AppleWallet/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/P3-AppleWallet/.DS_Store -------------------------------------------------------------------------------- /P3-AppleWallet/P3-AppleWallet.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /P3-AppleWallet/P3-AppleWallet.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /P3-AppleWallet/P3-AppleWallet/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // P3-AppleWallet 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 06/03/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | // Override point for customization after application launch. 18 | return true 19 | } 20 | 21 | // MARK: UISceneSession Lifecycle 22 | 23 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 24 | // Called when a new scene session is being created. 25 | // Use this method to select a configuration to create the new scene with. 26 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 27 | } 28 | 29 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 30 | // Called when the user discards a scene session. 31 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 32 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 33 | } 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /P3-AppleWallet/P3-AppleWallet/Assets.xcassets/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/P3-AppleWallet/P3-AppleWallet/Assets.xcassets/.DS_Store -------------------------------------------------------------------------------- /P3-AppleWallet/P3-AppleWallet/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /P3-AppleWallet/P3-AppleWallet/Assets.xcassets/basic.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "basic.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /P3-AppleWallet/P3-AppleWallet/Assets.xcassets/basic.imageset/basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/P3-AppleWallet/P3-AppleWallet/Assets.xcassets/basic.imageset/basic.png -------------------------------------------------------------------------------- /P3-AppleWallet/P3-AppleWallet/Assets.xcassets/gold.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "gold.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /P3-AppleWallet/P3-AppleWallet/Assets.xcassets/gold.imageset/gold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/P3-AppleWallet/P3-AppleWallet/Assets.xcassets/gold.imageset/gold.png -------------------------------------------------------------------------------- /P3-AppleWallet/P3-AppleWallet/Assets.xcassets/platinum.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "platinum.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /P3-AppleWallet/P3-AppleWallet/Assets.xcassets/platinum.imageset/platinum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/P3-AppleWallet/P3-AppleWallet/Assets.xcassets/platinum.imageset/platinum.png -------------------------------------------------------------------------------- /P3-AppleWallet/P3-AppleWallet/Assets.xcassets/standard.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "standard.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /P3-AppleWallet/P3-AppleWallet/Assets.xcassets/standard.imageset/standard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/P3-AppleWallet/P3-AppleWallet/Assets.xcassets/standard.imageset/standard.png -------------------------------------------------------------------------------- /P3-AppleWallet/P3-AppleWallet/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /P3-AppleWallet/P3-AppleWallet/Model/Card.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Card.swift 3 | // P3-AppleWallet 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 06/03/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | 12 | enum CardType: String { 13 | case visa 14 | case amex 15 | case master 16 | case chase 17 | } 18 | 19 | struct Card: Identifiable { 20 | var id = UUID() 21 | var clientName : String 22 | var number: String 23 | var expirationDate: String 24 | var type: CardType 25 | var image: String 26 | } 27 | 28 | let tempCards = [ 29 | Card(clientName: "Juan Gabriel Gomila", number: "1212 1212 1212 1212", 30 | expirationDate: "01/21", type: .visa, image: "basic"), 31 | Card(clientName: "Ricardo Gomila", number: "3434 3434 3434 3434", 32 | expirationDate: "03/24", type: .master, image: "gold"), 33 | Card(clientName: "Margarita Santos", number: "5656 5656 5656 5656", 34 | expirationDate: "05/26", type: .master, image: "platinum"), 35 | Card(clientName: "Juan Gabriel Gomila", number: "7878 7878 7878 7878", 36 | expirationDate: "07/28", type: .amex, image: "standard") 37 | ] 38 | 39 | -------------------------------------------------------------------------------- /P3-AppleWallet/P3-AppleWallet/Model/Transaction.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Transaction.swift 3 | // P3-AppleWallet 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 06/03/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | struct Transaction: Identifiable{ 12 | var id = UUID() 13 | var seller: String 14 | var amount: Double 15 | var date : String 16 | var icon: String = "dollarsign.circle.fill" 17 | } 18 | 19 | let transactions = [ 20 | Transaction(seller: "Amazon", amount: 13.99, date: "06/03/2020"), 21 | Transaction(seller: "Carrefour", amount: 109.24, date: "05/03/2020", icon: "cart.fill"), 22 | Transaction(seller: "Apple", amount: 1227.00, date: "09/02/2020", icon: "gift.fill"), 23 | Transaction(seller: "HBO", amount: 7.99, date: "07/01/2020", icon: "tv.circle.fill") 24 | ] 25 | -------------------------------------------------------------------------------- /P3-AppleWallet/P3-AppleWallet/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /P3-AppleWallet/P3-AppleWallet/View/DragState.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DragState.swift 3 | // P3-AppleWallet 4 | // 5 | // Created by Juan Gabriel Gomila Salas on 06/03/2020. 6 | // Copyright © 2020 Frogames. All rights reserved. 7 | // 8 | 9 | 10 | import Foundation 11 | import CoreGraphics 12 | 13 | enum DragState { 14 | case none 15 | case pressing(idx: Int? = nil) 16 | case dragging(idx: Int? = nil, translation: CGSize) 17 | 18 | var idx: Int? { 19 | switch self { 20 | case .pressing(let idx), .dragging(let idx, _): 21 | return idx 22 | default: 23 | return nil 24 | } 25 | } 26 | 27 | 28 | var translation: CGSize{ 29 | switch self { 30 | case .none, .pressing: 31 | return .zero 32 | case .dragging(_ , let translation): 33 | return translation 34 | } 35 | } 36 | 37 | var isPressing: Bool{ 38 | switch self { 39 | case .pressing, .dragging: 40 | return true 41 | case .none: 42 | return false 43 | } 44 | } 45 | 46 | var isDragging: Bool { 47 | switch self { 48 | case .dragging: 49 | return true 50 | default: 51 | return false 52 | } 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /Resources/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/Resources/.DS_Store -------------------------------------------------------------------------------- /Resources/Capturas Cursos/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/Resources/Capturas Cursos/.DS_Store -------------------------------------------------------------------------------- /Resources/Capturas Cursos/2397342_68bf_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/Resources/Capturas Cursos/2397342_68bf_2.jpg -------------------------------------------------------------------------------- /Resources/Capturas Cursos/2438730_59f7_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/Resources/Capturas Cursos/2438730_59f7_3.jpg -------------------------------------------------------------------------------- /Resources/Capturas Cursos/2521460_3ad6_2-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/Resources/Capturas Cursos/2521460_3ad6_2-2.jpg -------------------------------------------------------------------------------- /Resources/Capturas Cursos/2770738_e3ad.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/Resources/Capturas Cursos/2770738_e3ad.jpg -------------------------------------------------------------------------------- /Resources/Cards/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/Resources/Cards/.DS_Store -------------------------------------------------------------------------------- /Resources/Cards/basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/Resources/Cards/basic.png -------------------------------------------------------------------------------- /Resources/Cards/gold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/Resources/Cards/gold.png -------------------------------------------------------------------------------- /Resources/Cards/platinum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/Resources/Cards/platinum.png -------------------------------------------------------------------------------- /Resources/Cards/standard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/Resources/Cards/standard.png -------------------------------------------------------------------------------- /Resources/JSONPlayground.playground/contents.xcplayground: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Resources/Reto1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/Resources/Reto1.png -------------------------------------------------------------------------------- /Resources/Shapes.sketch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/Resources/Shapes.sketch -------------------------------------------------------------------------------- /Resources/Stacks.sketch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/Resources/Stacks.sketch -------------------------------------------------------------------------------- /Resources/example_2.json: -------------------------------------------------------------------------------- 1 | { 2 | "quiz": { 3 | "sport": { 4 | "q1": { 5 | "question": "Which one is correct team name in NBA?", 6 | "options": [ 7 | "New York Bulls", 8 | "Los Angeles Kings", 9 | "Golden State Warriros", 10 | "Huston Rocket" 11 | ], 12 | "answer": "Huston Rocket" 13 | } 14 | }, 15 | "maths": { 16 | "q1": { 17 | "question": "5 + 7 = ?", 18 | "options": [ 19 | "10", 20 | "11", 21 | "12", 22 | "13" 23 | ], 24 | "answer": "12" 25 | }, 26 | "q2": { 27 | "question": "12 - 8 = ?", 28 | "options": [ 29 | "1", 30 | "2", 31 | "3", 32 | "4" 33 | ], 34 | "answer": "4" 35 | } 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /Resources/newyork.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joanby/swiftui13/989fde856e5c56ba64fe52301027359fb16beb7a/Resources/newyork.jpg --------------------------------------------------------------------------------