├── .gitattributes ├── LICENSE ├── README.md ├── Resources.zip ├── Tutors.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata.xml │ ├── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ │ ├── SaiKambampati.xcuserdatad │ │ └── UserInterfaceState.xcuserstate │ │ └── simon.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ ├── SaiKambampati.xcuserdatad │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist.xml │ └── xcschemes │ │ └── xcschememanagement.plist │ └── simon.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── Tutors ├── AppDelegate.swift ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json ├── Base.lproj │ └── LaunchScreen.storyboard.xml ├── ContentView.swift ├── Info.plist ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json ├── SceneDelegate.swift ├── Tutor.swift ├── Tutor.xcassets │ ├── Alfian Losari.imageset │ │ ├── Contents.json │ │ └── alfianl.jpg │ ├── Andrew Jaffee.imageset │ │ ├── Contents.json │ │ └── andrewj.jpg │ ├── Athena Lam.imageset │ │ ├── Contents.json │ │ └── athenal.jpg │ ├── Contents.json │ ├── Gabriel Theodoropoulos.imageset │ │ ├── Contents.json │ │ └── gabrielt.png │ ├── Kelvin Tan.imageset │ │ ├── Contents.json │ │ └── kelvint.jpg │ ├── Lawrence Tan.imageset │ │ ├── Contents.json │ │ └── lawrencet.jpg │ ├── Sai Kambampati.imageset │ │ ├── 424919ed86a729ddf2d0167f6457605a.jpeg │ │ └── Contents.json │ └── Simon Ng.imageset │ │ ├── Contents.json │ │ └── simonn.jpg └── TutorDetail.swift └── swiftui-navigation-link.png /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Simon Ng 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SwiftUI Navigation Demo 2 | 3 | ![](swiftui-navigation-link.png) 4 | 5 | This demo app shows you how to build a table view and navigation interface with SwiftUI. For details, you can refer to the full tutorial at: 6 | 7 | https://www.appcoda.com/swiftui-first-look/ 8 | -------------------------------------------------------------------------------- /Resources.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcoda/SwiftUIDemo/ae354ecf3a0ef61c0318bbb1fbcbf9e59e2d8711/Resources.zip -------------------------------------------------------------------------------- /Tutors.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 8B2C631722A8ACE100D6FBAC /* Tutor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B2C631622A8ACE100D6FBAC /* Tutor.swift */; }; 11 | 8B2C631922A8AEFC00D6FBAC /* Tutor.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8B2C631822A8AEFC00D6FBAC /* Tutor.xcassets */; }; 12 | 8B5012CC22A84A9B007AA89E /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B5012CB22A84A9B007AA89E /* AppDelegate.swift */; }; 13 | 8B5012CE22A84A9B007AA89E /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B5012CD22A84A9B007AA89E /* SceneDelegate.swift */; }; 14 | 8B5012D022A84A9B007AA89E /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B5012CF22A84A9B007AA89E /* ContentView.swift */; }; 15 | 8B5012D222A84AA6007AA89E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8B5012D122A84AA6007AA89E /* Assets.xcassets */; }; 16 | 8B5012D522A84AA6007AA89E /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8B5012D422A84AA6007AA89E /* Preview Assets.xcassets */; }; 17 | 8BD5821022A8F06F00134097 /* TutorDetail.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BD5820F22A8F06F00134097 /* TutorDetail.swift */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXFileReference section */ 21 | 8B2C631622A8ACE100D6FBAC /* Tutor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tutor.swift; sourceTree = ""; }; 22 | 8B2C631822A8AEFC00D6FBAC /* Tutor.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Tutor.xcassets; sourceTree = ""; }; 23 | 8B5012C822A84A9B007AA89E /* Tutors.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Tutors.app; sourceTree = BUILT_PRODUCTS_DIR; }; 24 | 8B5012CB22A84A9B007AA89E /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 25 | 8B5012CD22A84A9B007AA89E /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; 26 | 8B5012CF22A84A9B007AA89E /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 27 | 8B5012D122A84AA6007AA89E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 28 | 8B5012D422A84AA6007AA89E /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 29 | 8B5012D922A84AA6007AA89E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 30 | 8BD5820F22A8F06F00134097 /* TutorDetail.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TutorDetail.swift; sourceTree = ""; }; 31 | /* End PBXFileReference section */ 32 | 33 | /* Begin PBXFrameworksBuildPhase section */ 34 | 8B5012C522A84A9B007AA89E /* Frameworks */ = { 35 | isa = PBXFrameworksBuildPhase; 36 | buildActionMask = 2147483647; 37 | files = ( 38 | ); 39 | runOnlyForDeploymentPostprocessing = 0; 40 | }; 41 | /* End PBXFrameworksBuildPhase section */ 42 | 43 | /* Begin PBXGroup section */ 44 | 8B5012BF22A84A9A007AA89E = { 45 | isa = PBXGroup; 46 | children = ( 47 | 8B5012CA22A84A9B007AA89E /* Tutors */, 48 | 8B5012C922A84A9B007AA89E /* Products */, 49 | ); 50 | sourceTree = ""; 51 | }; 52 | 8B5012C922A84A9B007AA89E /* Products */ = { 53 | isa = PBXGroup; 54 | children = ( 55 | 8B5012C822A84A9B007AA89E /* Tutors.app */, 56 | ); 57 | name = Products; 58 | sourceTree = ""; 59 | }; 60 | 8B5012CA22A84A9B007AA89E /* Tutors */ = { 61 | isa = PBXGroup; 62 | children = ( 63 | 8B5012CB22A84A9B007AA89E /* AppDelegate.swift */, 64 | 8B5012CD22A84A9B007AA89E /* SceneDelegate.swift */, 65 | 8B5012CF22A84A9B007AA89E /* ContentView.swift */, 66 | 8BD5820F22A8F06F00134097 /* TutorDetail.swift */, 67 | 8B2C631622A8ACE100D6FBAC /* Tutor.swift */, 68 | 8B2C631822A8AEFC00D6FBAC /* Tutor.xcassets */, 69 | 8B5012D122A84AA6007AA89E /* Assets.xcassets */, 70 | 8B5012D922A84AA6007AA89E /* Info.plist */, 71 | 8B5012D322A84AA6007AA89E /* Preview Content */, 72 | ); 73 | path = Tutors; 74 | sourceTree = ""; 75 | }; 76 | 8B5012D322A84AA6007AA89E /* Preview Content */ = { 77 | isa = PBXGroup; 78 | children = ( 79 | 8B5012D422A84AA6007AA89E /* Preview Assets.xcassets */, 80 | ); 81 | path = "Preview Content"; 82 | sourceTree = ""; 83 | }; 84 | /* End PBXGroup section */ 85 | 86 | /* Begin PBXNativeTarget section */ 87 | 8B5012C722A84A9B007AA89E /* Tutors */ = { 88 | isa = PBXNativeTarget; 89 | buildConfigurationList = 8B5012DC22A84AA7007AA89E /* Build configuration list for PBXNativeTarget "Tutors" */; 90 | buildPhases = ( 91 | 8B5012C422A84A9B007AA89E /* Sources */, 92 | 8B5012C522A84A9B007AA89E /* Frameworks */, 93 | 8B5012C622A84A9B007AA89E /* Resources */, 94 | ); 95 | buildRules = ( 96 | ); 97 | dependencies = ( 98 | ); 99 | name = Tutors; 100 | productName = Tutors; 101 | productReference = 8B5012C822A84A9B007AA89E /* Tutors.app */; 102 | productType = "com.apple.product-type.application"; 103 | }; 104 | /* End PBXNativeTarget section */ 105 | 106 | /* Begin PBXProject section */ 107 | 8B5012C022A84A9A007AA89E /* Project object */ = { 108 | isa = PBXProject; 109 | attributes = { 110 | LastSwiftUpdateCheck = 1100; 111 | LastUpgradeCheck = 1100; 112 | ORGANIZATIONNAME = AppCoda; 113 | TargetAttributes = { 114 | 8B5012C722A84A9B007AA89E = { 115 | CreatedOnToolsVersion = 11.0; 116 | }; 117 | }; 118 | }; 119 | buildConfigurationList = 8B5012C322A84A9B007AA89E /* Build configuration list for PBXProject "Tutors" */; 120 | compatibilityVersion = "Xcode 9.3"; 121 | developmentRegion = en; 122 | hasScannedForEncodings = 0; 123 | knownRegions = ( 124 | en, 125 | Base, 126 | ); 127 | mainGroup = 8B5012BF22A84A9A007AA89E; 128 | productRefGroup = 8B5012C922A84A9B007AA89E /* Products */; 129 | projectDirPath = ""; 130 | projectRoot = ""; 131 | targets = ( 132 | 8B5012C722A84A9B007AA89E /* Tutors */, 133 | ); 134 | }; 135 | /* End PBXProject section */ 136 | 137 | /* Begin PBXResourcesBuildPhase section */ 138 | 8B5012C622A84A9B007AA89E /* Resources */ = { 139 | isa = PBXResourcesBuildPhase; 140 | buildActionMask = 2147483647; 141 | files = ( 142 | 8B2C631922A8AEFC00D6FBAC /* Tutor.xcassets in Resources */, 143 | 8B5012D522A84AA6007AA89E /* Preview Assets.xcassets in Resources */, 144 | 8B5012D222A84AA6007AA89E /* Assets.xcassets in Resources */, 145 | ); 146 | runOnlyForDeploymentPostprocessing = 0; 147 | }; 148 | /* End PBXResourcesBuildPhase section */ 149 | 150 | /* Begin PBXSourcesBuildPhase section */ 151 | 8B5012C422A84A9B007AA89E /* Sources */ = { 152 | isa = PBXSourcesBuildPhase; 153 | buildActionMask = 2147483647; 154 | files = ( 155 | 8B2C631722A8ACE100D6FBAC /* Tutor.swift in Sources */, 156 | 8BD5821022A8F06F00134097 /* TutorDetail.swift in Sources */, 157 | 8B5012CC22A84A9B007AA89E /* AppDelegate.swift in Sources */, 158 | 8B5012CE22A84A9B007AA89E /* SceneDelegate.swift in Sources */, 159 | 8B5012D022A84A9B007AA89E /* ContentView.swift in Sources */, 160 | ); 161 | runOnlyForDeploymentPostprocessing = 0; 162 | }; 163 | /* End PBXSourcesBuildPhase section */ 164 | 165 | /* Begin XCBuildConfiguration section */ 166 | 8B5012DA22A84AA6007AA89E /* Debug */ = { 167 | isa = XCBuildConfiguration; 168 | buildSettings = { 169 | ALWAYS_SEARCH_USER_PATHS = NO; 170 | CLANG_ANALYZER_NONNULL = YES; 171 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 172 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 173 | CLANG_CXX_LIBRARY = "libc++"; 174 | CLANG_ENABLE_MODULES = YES; 175 | CLANG_ENABLE_OBJC_ARC = YES; 176 | CLANG_ENABLE_OBJC_WEAK = YES; 177 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 178 | CLANG_WARN_BOOL_CONVERSION = YES; 179 | CLANG_WARN_COMMA = YES; 180 | CLANG_WARN_CONSTANT_CONVERSION = YES; 181 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 182 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 183 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 184 | CLANG_WARN_EMPTY_BODY = YES; 185 | CLANG_WARN_ENUM_CONVERSION = YES; 186 | CLANG_WARN_INFINITE_RECURSION = YES; 187 | CLANG_WARN_INT_CONVERSION = YES; 188 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 189 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 190 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 191 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 192 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 193 | CLANG_WARN_STRICT_PROTOTYPES = YES; 194 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 195 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 196 | CLANG_WARN_UNREACHABLE_CODE = YES; 197 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 198 | COPY_PHASE_STRIP = NO; 199 | DEBUG_INFORMATION_FORMAT = dwarf; 200 | ENABLE_STRICT_OBJC_MSGSEND = YES; 201 | ENABLE_TESTABILITY = YES; 202 | GCC_C_LANGUAGE_STANDARD = gnu11; 203 | GCC_DYNAMIC_NO_PIC = NO; 204 | GCC_NO_COMMON_BLOCKS = YES; 205 | GCC_OPTIMIZATION_LEVEL = 0; 206 | GCC_PREPROCESSOR_DEFINITIONS = ( 207 | "DEBUG=1", 208 | "$(inherited)", 209 | ); 210 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 211 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 212 | GCC_WARN_UNDECLARED_SELECTOR = YES; 213 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 214 | GCC_WARN_UNUSED_FUNCTION = YES; 215 | GCC_WARN_UNUSED_VARIABLE = YES; 216 | IPHONEOS_DEPLOYMENT_TARGET = 13.0; 217 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 218 | MTL_FAST_MATH = YES; 219 | ONLY_ACTIVE_ARCH = YES; 220 | SDKROOT = iphoneos; 221 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 222 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 223 | }; 224 | name = Debug; 225 | }; 226 | 8B5012DB22A84AA7007AA89E /* Release */ = { 227 | isa = XCBuildConfiguration; 228 | buildSettings = { 229 | ALWAYS_SEARCH_USER_PATHS = NO; 230 | CLANG_ANALYZER_NONNULL = YES; 231 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 232 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 233 | CLANG_CXX_LIBRARY = "libc++"; 234 | CLANG_ENABLE_MODULES = YES; 235 | CLANG_ENABLE_OBJC_ARC = YES; 236 | CLANG_ENABLE_OBJC_WEAK = YES; 237 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 238 | CLANG_WARN_BOOL_CONVERSION = YES; 239 | CLANG_WARN_COMMA = YES; 240 | CLANG_WARN_CONSTANT_CONVERSION = YES; 241 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 242 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 243 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 244 | CLANG_WARN_EMPTY_BODY = YES; 245 | CLANG_WARN_ENUM_CONVERSION = YES; 246 | CLANG_WARN_INFINITE_RECURSION = YES; 247 | CLANG_WARN_INT_CONVERSION = YES; 248 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 249 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 250 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 251 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 252 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 253 | CLANG_WARN_STRICT_PROTOTYPES = YES; 254 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 255 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 256 | CLANG_WARN_UNREACHABLE_CODE = YES; 257 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 258 | COPY_PHASE_STRIP = NO; 259 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 260 | ENABLE_NS_ASSERTIONS = NO; 261 | ENABLE_STRICT_OBJC_MSGSEND = YES; 262 | GCC_C_LANGUAGE_STANDARD = gnu11; 263 | GCC_NO_COMMON_BLOCKS = YES; 264 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 265 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 266 | GCC_WARN_UNDECLARED_SELECTOR = YES; 267 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 268 | GCC_WARN_UNUSED_FUNCTION = YES; 269 | GCC_WARN_UNUSED_VARIABLE = YES; 270 | IPHONEOS_DEPLOYMENT_TARGET = 13.0; 271 | MTL_ENABLE_DEBUG_INFO = NO; 272 | MTL_FAST_MATH = YES; 273 | SDKROOT = iphoneos; 274 | SWIFT_COMPILATION_MODE = wholemodule; 275 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 276 | VALIDATE_PRODUCT = YES; 277 | }; 278 | name = Release; 279 | }; 280 | 8B5012DD22A84AA7007AA89E /* Debug */ = { 281 | isa = XCBuildConfiguration; 282 | buildSettings = { 283 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 284 | CODE_SIGN_STYLE = Automatic; 285 | DEVELOPMENT_ASSET_PATHS = "Tutors/Preview\\ Content"; 286 | DEVELOPMENT_TEAM = XJYMG76226; 287 | ENABLE_PREVIEWS = YES; 288 | INFOPLIST_FILE = Tutors/Info.plist; 289 | LD_RUNPATH_SEARCH_PATHS = ( 290 | "$(inherited)", 291 | "@executable_path/Frameworks", 292 | ); 293 | PRODUCT_BUNDLE_IDENTIFIER = com.AppCoda.Tutors; 294 | PRODUCT_NAME = "$(TARGET_NAME)"; 295 | SWIFT_VERSION = 5.0; 296 | TARGETED_DEVICE_FAMILY = "1,2"; 297 | }; 298 | name = Debug; 299 | }; 300 | 8B5012DE22A84AA7007AA89E /* Release */ = { 301 | isa = XCBuildConfiguration; 302 | buildSettings = { 303 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 304 | CODE_SIGN_STYLE = Automatic; 305 | DEVELOPMENT_ASSET_PATHS = "Tutors/Preview\\ Content"; 306 | DEVELOPMENT_TEAM = XJYMG76226; 307 | ENABLE_PREVIEWS = YES; 308 | INFOPLIST_FILE = Tutors/Info.plist; 309 | LD_RUNPATH_SEARCH_PATHS = ( 310 | "$(inherited)", 311 | "@executable_path/Frameworks", 312 | ); 313 | PRODUCT_BUNDLE_IDENTIFIER = com.AppCoda.Tutors; 314 | PRODUCT_NAME = "$(TARGET_NAME)"; 315 | SWIFT_VERSION = 5.0; 316 | TARGETED_DEVICE_FAMILY = "1,2"; 317 | }; 318 | name = Release; 319 | }; 320 | /* End XCBuildConfiguration section */ 321 | 322 | /* Begin XCConfigurationList section */ 323 | 8B5012C322A84A9B007AA89E /* Build configuration list for PBXProject "Tutors" */ = { 324 | isa = XCConfigurationList; 325 | buildConfigurations = ( 326 | 8B5012DA22A84AA6007AA89E /* Debug */, 327 | 8B5012DB22A84AA7007AA89E /* Release */, 328 | ); 329 | defaultConfigurationIsVisible = 0; 330 | defaultConfigurationName = Release; 331 | }; 332 | 8B5012DC22A84AA7007AA89E /* Build configuration list for PBXNativeTarget "Tutors" */ = { 333 | isa = XCConfigurationList; 334 | buildConfigurations = ( 335 | 8B5012DD22A84AA7007AA89E /* Debug */, 336 | 8B5012DE22A84AA7007AA89E /* Release */, 337 | ); 338 | defaultConfigurationIsVisible = 0; 339 | defaultConfigurationName = Release; 340 | }; 341 | /* End XCConfigurationList section */ 342 | }; 343 | rootObject = 8B5012C022A84A9A007AA89E /* Project object */; 344 | } 345 | -------------------------------------------------------------------------------- /Tutors.xcodeproj/project.xcworkspace/contents.xcworkspacedata.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Tutors.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Tutors.xcodeproj/project.xcworkspace/xcuserdata/SaiKambampati.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcoda/SwiftUIDemo/ae354ecf3a0ef61c0318bbb1fbcbf9e59e2d8711/Tutors.xcodeproj/project.xcworkspace/xcuserdata/SaiKambampati.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Tutors.xcodeproj/project.xcworkspace/xcuserdata/simon.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcoda/SwiftUIDemo/ae354ecf3a0ef61c0318bbb1fbcbf9e59e2d8711/Tutors.xcodeproj/project.xcworkspace/xcuserdata/simon.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Tutors.xcodeproj/xcuserdata/SaiKambampati.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | -------------------------------------------------------------------------------- /Tutors.xcodeproj/xcuserdata/SaiKambampati.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Tutors.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Tutors.xcodeproj/xcuserdata/simon.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Tutors.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Tutors/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Tutors 4 | // 5 | // Created by Sai Kambampati on 6/5/19. 6 | // Copyright © 2019 AppCoda. 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 | func applicationWillTerminate(_ application: UIApplication) { 22 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 23 | } 24 | 25 | // MARK: UISceneSession Lifecycle 26 | 27 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 28 | // Called when a new scene session is being created. 29 | // Use this method to select a configuration to create the new scene with. 30 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 31 | } 32 | 33 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 34 | // Called when the user discards a scene session. 35 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 36 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 37 | } 38 | 39 | 40 | } 41 | 42 | -------------------------------------------------------------------------------- /Tutors/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 | } -------------------------------------------------------------------------------- /Tutors/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Tutors/Base.lproj/LaunchScreen.storyboard.xml: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /Tutors/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // Tutors 4 | // 5 | // Created by Sai Kambampati on 6/5/19. 6 | // Copyright © 2019 AppCoda. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct ContentView : View { 12 | var tutors: [Tutor] = [] 13 | 14 | var body: some View { 15 | NavigationView { 16 | List(tutors) { tutor in 17 | TutorCell(tutor: tutor) 18 | }.navigationBarTitle(Text("Tutors")) 19 | } 20 | } 21 | } 22 | 23 | #if DEBUG 24 | struct ContentView_Previews : PreviewProvider { 25 | static var previews: some View { 26 | ContentView(tutors: testData) 27 | } 28 | } 29 | #endif 30 | 31 | struct TutorCell : View { 32 | let tutor: Tutor 33 | var body: some View { 34 | return NavigationLink(destination: TutorDetail(name: tutor.name, headline: tutor.headline, bio: tutor.bio)) { 35 | Image(tutor.imageName) 36 | .cornerRadius(40) 37 | VStack(alignment: .leading) { 38 | Text(tutor.name) 39 | Text(tutor.headline) 40 | .font(.subheadline) 41 | .foregroundColor(.gray) 42 | } 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Tutors/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UIApplicationSceneManifest 24 | 25 | UIApplicationSupportsMultipleScenes 26 | 27 | UISceneConfigurations 28 | 29 | UIWindowSceneSessionRoleApplication 30 | 31 | 32 | UILaunchStoryboardName 33 | LaunchScreen 34 | UISceneConfigurationName 35 | Default Configuration 36 | UISceneDelegateClassName 37 | $(PRODUCT_MODULE_NAME).SceneDelegate 38 | 39 | 40 | 41 | 42 | UILaunchStoryboardName 43 | LaunchScreen 44 | UIRequiredDeviceCapabilities 45 | 46 | armv7 47 | 48 | UISupportedInterfaceOrientations 49 | 50 | UIInterfaceOrientationPortrait 51 | UIInterfaceOrientationLandscapeLeft 52 | UIInterfaceOrientationLandscapeRight 53 | 54 | UISupportedInterfaceOrientations~ipad 55 | 56 | UIInterfaceOrientationPortrait 57 | UIInterfaceOrientationPortraitUpsideDown 58 | UIInterfaceOrientationLandscapeLeft 59 | UIInterfaceOrientationLandscapeRight 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /Tutors/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Tutors/SceneDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SceneDelegate.swift 3 | // Tutors 4 | // 5 | // Created by Sai Kambampati on 6/5/19. 6 | // Copyright © 2019 AppCoda. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SwiftUI 11 | 12 | class SceneDelegate: UIResponder, UIWindowSceneDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { 18 | // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. 19 | // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. 20 | // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). 21 | 22 | // Use a UIHostingController as window root view controller 23 | let window = UIWindow(frame: UIScreen.main.bounds) 24 | window.rootViewController = UIHostingController(rootView: ContentView()) 25 | self.window = window 26 | window.makeKeyAndVisible() 27 | } 28 | 29 | func sceneDidDisconnect(_ scene: UIScene) { 30 | // Called as the scene is being released by the system. 31 | // This occurs shortly after the scene enters the background, or when its session is discarded. 32 | // Release any resources associated with this scene that can be re-created the next time the scene connects. 33 | // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). 34 | } 35 | 36 | func sceneDidBecomeActive(_ scene: UIScene) { 37 | // Called when the scene has moved from an inactive state to an active state. 38 | // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. 39 | } 40 | 41 | func sceneWillResignActive(_ scene: UIScene) { 42 | // Called when the scene will move from an active state to an inactive state. 43 | // This may occur due to temporary interruptions (ex. an incoming phone call). 44 | } 45 | 46 | func sceneWillEnterForeground(_ scene: UIScene) { 47 | // Called as the scene transitions from the background to the foreground. 48 | // Use this method to undo the changes made on entering the background. 49 | } 50 | 51 | func sceneDidEnterBackground(_ scene: UIScene) { 52 | // Called as the scene transitions from the foreground to the background. 53 | // Use this method to save data, release shared resources, and store enough scene-specific state information 54 | // to restore the scene back to its current state. 55 | } 56 | 57 | 58 | } 59 | 60 | -------------------------------------------------------------------------------- /Tutors/Tutor.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Tutor.swift 3 | // Tutors 4 | // 5 | // Created by Sai Kambampati on 6/5/19. 6 | // Copyright © 2019 AppCoda. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct Tutor: Identifiable { 12 | var id = UUID() 13 | var name: String 14 | var headline: String 15 | var bio: String 16 | 17 | var imageName: String { return name } 18 | } 19 | 20 | #if DEBUG 21 | let testData = [ 22 | Tutor(name: "Sai Kambampati", headline: "Writer at AppCoda", bio: "Sai Kambampati is an app developer. He lives in Sacramento, CA and was awarded with Apple's WWDC 2017 Scholarship. Proficient in Swift and Python, it's his dream to develop an AI product."), 23 | Tutor(name: "Simon Ng", headline: "Founder of AppCoda", bio: "Founder of AppCoda. Author of multiple iOS prgramming books including Beginning iOS 12 Programming with Swift and Intermediate iOS 12 Programming with Swift. iOS Developer and Blogger."), 24 | Tutor(name: "Gabriel Theodoropoulos", headline: "Advanced Software Developer", bio: "Gabriel has been a software developer for about two decades. He has long experience in developing software solutions for various platforms in many programming languages."), 25 | Tutor(name: "Andrew Jaffee", headline: "Author and Software Developer", bio: "Avid and well-published author and software developer now specializing in iOS mobile app development in Obj-C and Swift. Andrew has published several apps in the Apple App Store and 30 years of experience."), 26 | Tutor(name: "Athena Lam", headline: "Content marketing professional", bio: "Athena is a co-founder of Business 3.0, a publication dedicated to sharing founders journeys in product and business development in East Asia. Social justice advocate."), 27 | Tutor(name: "Alfian Losari", headline: "Lifelong Learner", bio: "Mobile, Web, a bit of backend Software Developer and LifeLong Learner. Current building super app."), 28 | Tutor(name: "Lawrence Tan", headline: "Passionate iOS Developer", bio: "Lawrence is a passionate iOS Developer with over 3 years of commercial experience and had worked with clirents from US, Europe, and Asia. He's a tech addict and Swift enthusiast."), 29 | Tutor(name: "Kelvin Tan", headline: "Self-taught iOS Mobile Developer", bio: "Kelvin is a self taught iOS Mobile Developer who is currently active writing tutorials on his site. He is from Malaysia and speaks about 4 different languages."), 30 | ] 31 | #endif 32 | -------------------------------------------------------------------------------- /Tutors/Tutor.xcassets/Alfian Losari.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "alfianl.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 | } -------------------------------------------------------------------------------- /Tutors/Tutor.xcassets/Alfian Losari.imageset/alfianl.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcoda/SwiftUIDemo/ae354ecf3a0ef61c0318bbb1fbcbf9e59e2d8711/Tutors/Tutor.xcassets/Alfian Losari.imageset/alfianl.jpg -------------------------------------------------------------------------------- /Tutors/Tutor.xcassets/Andrew Jaffee.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "andrewj.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 | } -------------------------------------------------------------------------------- /Tutors/Tutor.xcassets/Andrew Jaffee.imageset/andrewj.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcoda/SwiftUIDemo/ae354ecf3a0ef61c0318bbb1fbcbf9e59e2d8711/Tutors/Tutor.xcassets/Andrew Jaffee.imageset/andrewj.jpg -------------------------------------------------------------------------------- /Tutors/Tutor.xcassets/Athena Lam.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "athenal.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 | } -------------------------------------------------------------------------------- /Tutors/Tutor.xcassets/Athena Lam.imageset/athenal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcoda/SwiftUIDemo/ae354ecf3a0ef61c0318bbb1fbcbf9e59e2d8711/Tutors/Tutor.xcassets/Athena Lam.imageset/athenal.jpg -------------------------------------------------------------------------------- /Tutors/Tutor.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Tutors/Tutor.xcassets/Gabriel Theodoropoulos.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "gabrielt.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 | } -------------------------------------------------------------------------------- /Tutors/Tutor.xcassets/Gabriel Theodoropoulos.imageset/gabrielt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcoda/SwiftUIDemo/ae354ecf3a0ef61c0318bbb1fbcbf9e59e2d8711/Tutors/Tutor.xcassets/Gabriel Theodoropoulos.imageset/gabrielt.png -------------------------------------------------------------------------------- /Tutors/Tutor.xcassets/Kelvin Tan.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "kelvint.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 | } -------------------------------------------------------------------------------- /Tutors/Tutor.xcassets/Kelvin Tan.imageset/kelvint.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcoda/SwiftUIDemo/ae354ecf3a0ef61c0318bbb1fbcbf9e59e2d8711/Tutors/Tutor.xcassets/Kelvin Tan.imageset/kelvint.jpg -------------------------------------------------------------------------------- /Tutors/Tutor.xcassets/Lawrence Tan.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "lawrencet.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 | } -------------------------------------------------------------------------------- /Tutors/Tutor.xcassets/Lawrence Tan.imageset/lawrencet.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcoda/SwiftUIDemo/ae354ecf3a0ef61c0318bbb1fbcbf9e59e2d8711/Tutors/Tutor.xcassets/Lawrence Tan.imageset/lawrencet.jpg -------------------------------------------------------------------------------- /Tutors/Tutor.xcassets/Sai Kambampati.imageset/424919ed86a729ddf2d0167f6457605a.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcoda/SwiftUIDemo/ae354ecf3a0ef61c0318bbb1fbcbf9e59e2d8711/Tutors/Tutor.xcassets/Sai Kambampati.imageset/424919ed86a729ddf2d0167f6457605a.jpeg -------------------------------------------------------------------------------- /Tutors/Tutor.xcassets/Sai Kambampati.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "424919ed86a729ddf2d0167f6457605a.jpeg", 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 | } -------------------------------------------------------------------------------- /Tutors/Tutor.xcassets/Simon Ng.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "simonn.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 | } -------------------------------------------------------------------------------- /Tutors/Tutor.xcassets/Simon Ng.imageset/simonn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcoda/SwiftUIDemo/ae354ecf3a0ef61c0318bbb1fbcbf9e59e2d8711/Tutors/Tutor.xcassets/Simon Ng.imageset/simonn.jpg -------------------------------------------------------------------------------- /Tutors/TutorDetail.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TutorDetail.swift 3 | // Tutors 4 | // 5 | // Created by Sai Kambampati on 6/5/19. 6 | // Copyright © 2019 AppCoda. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct TutorDetail : View { 12 | var name: String 13 | var headline: String 14 | var bio: String 15 | 16 | var body: some View { 17 | VStack { 18 | Image(name) 19 | .clipShape(Circle()) 20 | .overlay( 21 | Circle().stroke(Color.orange, lineWidth: 4) 22 | ) 23 | .shadow(radius: 10) 24 | Text(name) 25 | .font(.title) 26 | Text(headline) 27 | .font(.subheadline) 28 | Divider() 29 | Text(bio) 30 | .font(.headline) 31 | .multilineTextAlignment(.center) 32 | .lineLimit(50) 33 | }.padding().navigationBarTitle(Text(name), displayMode: .inline) 34 | } 35 | } 36 | 37 | #if DEBUG 38 | struct TutorDetail_Previews : PreviewProvider { 39 | static var previews: some View { 40 | TutorDetail(name: "Simon Ng", headline: "Founder of AppCoda", bio: "Founder of AppCoda. Author of multiple iOS prgramming books including Beginning iOS 12 Programming with Swift and Intermediate iOS 12 Programming with Swift. iOS Developer and Blogger.") 41 | } 42 | } 43 | #endif 44 | -------------------------------------------------------------------------------- /swiftui-navigation-link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcoda/SwiftUIDemo/ae354ecf3a0ef61c0318bbb1fbcbf9e59e2d8711/swiftui-navigation-link.png --------------------------------------------------------------------------------