├── .gitignore ├── HeroApplication.xcodeproj └── project.pbxproj ├── HeroApplication.xcworkspace └── contents.xcworkspacedata ├── HeroApplication ├── AppDelegate.swift ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ └── Images │ │ ├── Contents.json │ │ ├── Image-1.imageset │ │ ├── Contents.json │ │ └── Image-1.jpg │ │ ├── Image-2.imageset │ │ ├── Contents.json │ │ └── Image-2.jpg │ │ ├── Image-3.imageset │ │ ├── Contents.json │ │ └── Image-3.jpg │ │ ├── Image-4.imageset │ │ ├── Contents.json │ │ └── Image-4.jpg │ │ ├── Image-5.imageset │ │ ├── Contents.json │ │ └── Image-5.jpg │ │ └── Image-6.imageset │ │ ├── Contents.json │ │ └── Image-6.jpg ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Info.plist ├── Model │ └── Image.swift └── TableView │ ├── DetailViewController.swift │ ├── ImageCell.swift │ └── TableViewController.swift ├── Podfile ├── Podfile.lock └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/xcode, 3 | Pods/ 4 | 5 | ### Xcode ### 6 | # Xcode 7 | # 8 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 9 | 10 | ## Build generated 11 | build/ 12 | DerivedData/ 13 | 14 | ## Various settings 15 | *.pbxuser 16 | !default.pbxuser 17 | *.mode1v3 18 | !default.mode1v3 19 | *.mode2v3 20 | !default.mode2v3 21 | *.perspectivev3 22 | !default.perspectivev3 23 | xcuserdata/ 24 | 25 | ## Other 26 | *.moved-aside 27 | *.xccheckout 28 | *.xcscmblueprint 29 | 30 | ### Xcode Patch ### 31 | 32 | #!! ERROR: is undefined. Use list command to see defined gitignore types !!# 33 | 34 | # End of https://www.gitignore.io/api/xcode, 35 | 36 | # Created by https://www.gitignore.io/api/xcode, 37 | 38 | ### Xcode ### 39 | # Xcode 40 | # 41 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 42 | 43 | ## Build generated 44 | build/ 45 | DerivedData/ 46 | 47 | ## Various settings 48 | *.pbxuser 49 | !default.pbxuser 50 | *.mode1v3 51 | !default.mode1v3 52 | *.mode2v3 53 | !default.mode2v3 54 | *.perspectivev3 55 | !default.perspectivev3 56 | xcuserdata/ 57 | 58 | ## Other 59 | *.moved-aside 60 | *.xccheckout 61 | *.xcscmblueprint 62 | 63 | ### Xcode Patch ### 64 | *.xcodeproj/* 65 | !*.xcodeproj/project.pbxproj 66 | !*.xcodeproj/xcshareddata/ 67 | !*.xcworkspace/contents.xcworkspacedata 68 | /*.gcno 69 | 70 | #!! ERROR: is undefined. Use list command to see defined gitignore types !!# 71 | 72 | # End of https://www.gitignore.io/api/xcode, 73 | -------------------------------------------------------------------------------- /HeroApplication.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 48; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | A6F410F3E95FDE0C8B378466 /* Pods_HeroApplication.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C85D34444AF25545937DB01A /* Pods_HeroApplication.framework */; }; 11 | DAAE9ACA1FA8F473005ED21F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAAE9AC91FA8F473005ED21F /* AppDelegate.swift */; }; 12 | DAAE9ACF1FA8F473005ED21F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DAAE9ACD1FA8F473005ED21F /* Main.storyboard */; }; 13 | DAAE9AD11FA8F473005ED21F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DAAE9AD01FA8F473005ED21F /* Assets.xcassets */; }; 14 | DAAE9AD41FA8F473005ED21F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DAAE9AD21FA8F473005ED21F /* LaunchScreen.storyboard */; }; 15 | DAAE9ADD1FA8F54C005ED21F /* TableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAAE9ADC1FA8F54C005ED21F /* TableViewController.swift */; }; 16 | DAAE9ADF1FA8F572005ED21F /* ImageCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAAE9ADE1FA8F572005ED21F /* ImageCell.swift */; }; 17 | DAAE9AE11FA8F581005ED21F /* DetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAAE9AE01FA8F581005ED21F /* DetailViewController.swift */; }; 18 | DAAE9AE31FA8F5B4005ED21F /* Image.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAAE9AE21FA8F5B4005ED21F /* Image.swift */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXFileReference section */ 22 | A7B6FAA7F2052E29BCE273B8 /* Pods-HeroApplication.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HeroApplication.debug.xcconfig"; path = "Pods/Target Support Files/Pods-HeroApplication/Pods-HeroApplication.debug.xcconfig"; sourceTree = ""; }; 23 | C85D34444AF25545937DB01A /* Pods_HeroApplication.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_HeroApplication.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 24 | DAAE9AC61FA8F473005ED21F /* HeroApplication.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HeroApplication.app; sourceTree = BUILT_PRODUCTS_DIR; }; 25 | DAAE9AC91FA8F473005ED21F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 26 | DAAE9ACE1FA8F473005ED21F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 27 | DAAE9AD01FA8F473005ED21F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 28 | DAAE9AD31FA8F473005ED21F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 29 | DAAE9AD51FA8F473005ED21F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 30 | DAAE9ADC1FA8F54C005ED21F /* TableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TableViewController.swift; sourceTree = ""; }; 31 | DAAE9ADE1FA8F572005ED21F /* ImageCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageCell.swift; sourceTree = ""; }; 32 | DAAE9AE01FA8F581005ED21F /* DetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailViewController.swift; sourceTree = ""; }; 33 | DAAE9AE21FA8F5B4005ED21F /* Image.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Image.swift; sourceTree = ""; }; 34 | E2C3D0E4C439F02ABE40C821 /* Pods-HeroApplication.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HeroApplication.release.xcconfig"; path = "Pods/Target Support Files/Pods-HeroApplication/Pods-HeroApplication.release.xcconfig"; sourceTree = ""; }; 35 | /* End PBXFileReference section */ 36 | 37 | /* Begin PBXFrameworksBuildPhase section */ 38 | DAAE9AC31FA8F473005ED21F /* Frameworks */ = { 39 | isa = PBXFrameworksBuildPhase; 40 | buildActionMask = 2147483647; 41 | files = ( 42 | A6F410F3E95FDE0C8B378466 /* Pods_HeroApplication.framework in Frameworks */, 43 | ); 44 | runOnlyForDeploymentPostprocessing = 0; 45 | }; 46 | /* End PBXFrameworksBuildPhase section */ 47 | 48 | /* Begin PBXGroup section */ 49 | 4D79F2CE7938F7BFC136FC1A /* Pods */ = { 50 | isa = PBXGroup; 51 | children = ( 52 | A7B6FAA7F2052E29BCE273B8 /* Pods-HeroApplication.debug.xcconfig */, 53 | E2C3D0E4C439F02ABE40C821 /* Pods-HeroApplication.release.xcconfig */, 54 | ); 55 | name = Pods; 56 | sourceTree = ""; 57 | }; 58 | DA9B12591FA8F9A700E89603 /* Model */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | DAAE9AE21FA8F5B4005ED21F /* Image.swift */, 62 | ); 63 | path = Model; 64 | sourceTree = ""; 65 | }; 66 | DAAE9ABD1FA8F473005ED21F = { 67 | isa = PBXGroup; 68 | children = ( 69 | DAAE9AC81FA8F473005ED21F /* HeroApplication */, 70 | DAAE9AC71FA8F473005ED21F /* Products */, 71 | 4D79F2CE7938F7BFC136FC1A /* Pods */, 72 | DFCECD38F9E8FF3BFED214AC /* Frameworks */, 73 | ); 74 | sourceTree = ""; 75 | }; 76 | DAAE9AC71FA8F473005ED21F /* Products */ = { 77 | isa = PBXGroup; 78 | children = ( 79 | DAAE9AC61FA8F473005ED21F /* HeroApplication.app */, 80 | ); 81 | name = Products; 82 | sourceTree = ""; 83 | }; 84 | DAAE9AC81FA8F473005ED21F /* HeroApplication */ = { 85 | isa = PBXGroup; 86 | children = ( 87 | DA9B12591FA8F9A700E89603 /* Model */, 88 | DAAE9ADB1FA8F523005ED21F /* TableView */, 89 | DAAE9AC91FA8F473005ED21F /* AppDelegate.swift */, 90 | DAAE9ACD1FA8F473005ED21F /* Main.storyboard */, 91 | DAAE9AD01FA8F473005ED21F /* Assets.xcassets */, 92 | DAAE9AD21FA8F473005ED21F /* LaunchScreen.storyboard */, 93 | DAAE9AD51FA8F473005ED21F /* Info.plist */, 94 | ); 95 | path = HeroApplication; 96 | sourceTree = ""; 97 | }; 98 | DAAE9ADB1FA8F523005ED21F /* TableView */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | DAAE9ADC1FA8F54C005ED21F /* TableViewController.swift */, 102 | DAAE9ADE1FA8F572005ED21F /* ImageCell.swift */, 103 | DAAE9AE01FA8F581005ED21F /* DetailViewController.swift */, 104 | ); 105 | path = TableView; 106 | sourceTree = ""; 107 | }; 108 | DFCECD38F9E8FF3BFED214AC /* Frameworks */ = { 109 | isa = PBXGroup; 110 | children = ( 111 | C85D34444AF25545937DB01A /* Pods_HeroApplication.framework */, 112 | ); 113 | name = Frameworks; 114 | sourceTree = ""; 115 | }; 116 | /* End PBXGroup section */ 117 | 118 | /* Begin PBXNativeTarget section */ 119 | DAAE9AC51FA8F473005ED21F /* HeroApplication */ = { 120 | isa = PBXNativeTarget; 121 | buildConfigurationList = DAAE9AD81FA8F473005ED21F /* Build configuration list for PBXNativeTarget "HeroApplication" */; 122 | buildPhases = ( 123 | 1A50F7B0B2B07D2F12787D12 /* [CP] Check Pods Manifest.lock */, 124 | DAAE9AC21FA8F473005ED21F /* Sources */, 125 | DAAE9AC31FA8F473005ED21F /* Frameworks */, 126 | DAAE9AC41FA8F473005ED21F /* Resources */, 127 | CB56FCB966E4E6E27F87D7E4 /* [CP] Embed Pods Frameworks */, 128 | 6206B416607935B34D4E5469 /* [CP] Copy Pods Resources */, 129 | ); 130 | buildRules = ( 131 | ); 132 | dependencies = ( 133 | ); 134 | name = HeroApplication; 135 | productName = HeroApplication; 136 | productReference = DAAE9AC61FA8F473005ED21F /* HeroApplication.app */; 137 | productType = "com.apple.product-type.application"; 138 | }; 139 | /* End PBXNativeTarget section */ 140 | 141 | /* Begin PBXProject section */ 142 | DAAE9ABE1FA8F473005ED21F /* Project object */ = { 143 | isa = PBXProject; 144 | attributes = { 145 | LastSwiftUpdateCheck = 0900; 146 | LastUpgradeCheck = 0900; 147 | ORGANIZATIONNAME = "Gary Tokman"; 148 | TargetAttributes = { 149 | DAAE9AC51FA8F473005ED21F = { 150 | CreatedOnToolsVersion = 9.0.1; 151 | ProvisioningStyle = Automatic; 152 | }; 153 | }; 154 | }; 155 | buildConfigurationList = DAAE9AC11FA8F473005ED21F /* Build configuration list for PBXProject "HeroApplication" */; 156 | compatibilityVersion = "Xcode 8.0"; 157 | developmentRegion = en; 158 | hasScannedForEncodings = 0; 159 | knownRegions = ( 160 | en, 161 | Base, 162 | ); 163 | mainGroup = DAAE9ABD1FA8F473005ED21F; 164 | productRefGroup = DAAE9AC71FA8F473005ED21F /* Products */; 165 | projectDirPath = ""; 166 | projectRoot = ""; 167 | targets = ( 168 | DAAE9AC51FA8F473005ED21F /* HeroApplication */, 169 | ); 170 | }; 171 | /* End PBXProject section */ 172 | 173 | /* Begin PBXResourcesBuildPhase section */ 174 | DAAE9AC41FA8F473005ED21F /* Resources */ = { 175 | isa = PBXResourcesBuildPhase; 176 | buildActionMask = 2147483647; 177 | files = ( 178 | DAAE9AD41FA8F473005ED21F /* LaunchScreen.storyboard in Resources */, 179 | DAAE9AD11FA8F473005ED21F /* Assets.xcassets in Resources */, 180 | DAAE9ACF1FA8F473005ED21F /* Main.storyboard in Resources */, 181 | ); 182 | runOnlyForDeploymentPostprocessing = 0; 183 | }; 184 | /* End PBXResourcesBuildPhase section */ 185 | 186 | /* Begin PBXShellScriptBuildPhase section */ 187 | 1A50F7B0B2B07D2F12787D12 /* [CP] Check Pods Manifest.lock */ = { 188 | isa = PBXShellScriptBuildPhase; 189 | buildActionMask = 2147483647; 190 | files = ( 191 | ); 192 | inputPaths = ( 193 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 194 | "${PODS_ROOT}/Manifest.lock", 195 | ); 196 | name = "[CP] Check Pods Manifest.lock"; 197 | outputPaths = ( 198 | "$(DERIVED_FILE_DIR)/Pods-HeroApplication-checkManifestLockResult.txt", 199 | ); 200 | runOnlyForDeploymentPostprocessing = 0; 201 | shellPath = /bin/sh; 202 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 203 | showEnvVarsInLog = 0; 204 | }; 205 | 6206B416607935B34D4E5469 /* [CP] Copy Pods Resources */ = { 206 | isa = PBXShellScriptBuildPhase; 207 | buildActionMask = 2147483647; 208 | files = ( 209 | ); 210 | inputPaths = ( 211 | ); 212 | name = "[CP] Copy Pods Resources"; 213 | outputPaths = ( 214 | ); 215 | runOnlyForDeploymentPostprocessing = 0; 216 | shellPath = /bin/sh; 217 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-HeroApplication/Pods-HeroApplication-resources.sh\"\n"; 218 | showEnvVarsInLog = 0; 219 | }; 220 | CB56FCB966E4E6E27F87D7E4 /* [CP] Embed Pods Frameworks */ = { 221 | isa = PBXShellScriptBuildPhase; 222 | buildActionMask = 2147483647; 223 | files = ( 224 | ); 225 | inputPaths = ( 226 | "${SRCROOT}/Pods/Target Support Files/Pods-HeroApplication/Pods-HeroApplication-frameworks.sh", 227 | "${BUILT_PRODUCTS_DIR}/Hero/Hero.framework", 228 | ); 229 | name = "[CP] Embed Pods Frameworks"; 230 | outputPaths = ( 231 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hero.framework", 232 | ); 233 | runOnlyForDeploymentPostprocessing = 0; 234 | shellPath = /bin/sh; 235 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-HeroApplication/Pods-HeroApplication-frameworks.sh\"\n"; 236 | showEnvVarsInLog = 0; 237 | }; 238 | /* End PBXShellScriptBuildPhase section */ 239 | 240 | /* Begin PBXSourcesBuildPhase section */ 241 | DAAE9AC21FA8F473005ED21F /* Sources */ = { 242 | isa = PBXSourcesBuildPhase; 243 | buildActionMask = 2147483647; 244 | files = ( 245 | DAAE9ACA1FA8F473005ED21F /* AppDelegate.swift in Sources */, 246 | DAAE9ADD1FA8F54C005ED21F /* TableViewController.swift in Sources */, 247 | DAAE9ADF1FA8F572005ED21F /* ImageCell.swift in Sources */, 248 | DAAE9AE11FA8F581005ED21F /* DetailViewController.swift in Sources */, 249 | DAAE9AE31FA8F5B4005ED21F /* Image.swift in Sources */, 250 | ); 251 | runOnlyForDeploymentPostprocessing = 0; 252 | }; 253 | /* End PBXSourcesBuildPhase section */ 254 | 255 | /* Begin PBXVariantGroup section */ 256 | DAAE9ACD1FA8F473005ED21F /* Main.storyboard */ = { 257 | isa = PBXVariantGroup; 258 | children = ( 259 | DAAE9ACE1FA8F473005ED21F /* Base */, 260 | ); 261 | name = Main.storyboard; 262 | sourceTree = ""; 263 | }; 264 | DAAE9AD21FA8F473005ED21F /* LaunchScreen.storyboard */ = { 265 | isa = PBXVariantGroup; 266 | children = ( 267 | DAAE9AD31FA8F473005ED21F /* Base */, 268 | ); 269 | name = LaunchScreen.storyboard; 270 | sourceTree = ""; 271 | }; 272 | /* End PBXVariantGroup section */ 273 | 274 | /* Begin XCBuildConfiguration section */ 275 | DAAE9AD61FA8F473005ED21F /* Debug */ = { 276 | isa = XCBuildConfiguration; 277 | buildSettings = { 278 | ALWAYS_SEARCH_USER_PATHS = NO; 279 | CLANG_ANALYZER_NONNULL = YES; 280 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 281 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 282 | CLANG_CXX_LIBRARY = "libc++"; 283 | CLANG_ENABLE_MODULES = YES; 284 | CLANG_ENABLE_OBJC_ARC = YES; 285 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 286 | CLANG_WARN_BOOL_CONVERSION = YES; 287 | CLANG_WARN_COMMA = YES; 288 | CLANG_WARN_CONSTANT_CONVERSION = YES; 289 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 290 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 291 | CLANG_WARN_EMPTY_BODY = YES; 292 | CLANG_WARN_ENUM_CONVERSION = YES; 293 | CLANG_WARN_INFINITE_RECURSION = YES; 294 | CLANG_WARN_INT_CONVERSION = YES; 295 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 296 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 297 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 298 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 299 | CLANG_WARN_STRICT_PROTOTYPES = YES; 300 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 301 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 302 | CLANG_WARN_UNREACHABLE_CODE = YES; 303 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 304 | CODE_SIGN_IDENTITY = "iPhone Developer"; 305 | COPY_PHASE_STRIP = NO; 306 | DEBUG_INFORMATION_FORMAT = dwarf; 307 | ENABLE_STRICT_OBJC_MSGSEND = YES; 308 | ENABLE_TESTABILITY = YES; 309 | GCC_C_LANGUAGE_STANDARD = gnu11; 310 | GCC_DYNAMIC_NO_PIC = NO; 311 | GCC_NO_COMMON_BLOCKS = YES; 312 | GCC_OPTIMIZATION_LEVEL = 0; 313 | GCC_PREPROCESSOR_DEFINITIONS = ( 314 | "DEBUG=1", 315 | "$(inherited)", 316 | ); 317 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 318 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 319 | GCC_WARN_UNDECLARED_SELECTOR = YES; 320 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 321 | GCC_WARN_UNUSED_FUNCTION = YES; 322 | GCC_WARN_UNUSED_VARIABLE = YES; 323 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 324 | MTL_ENABLE_DEBUG_INFO = YES; 325 | ONLY_ACTIVE_ARCH = YES; 326 | SDKROOT = iphoneos; 327 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 328 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 329 | }; 330 | name = Debug; 331 | }; 332 | DAAE9AD71FA8F473005ED21F /* Release */ = { 333 | isa = XCBuildConfiguration; 334 | buildSettings = { 335 | ALWAYS_SEARCH_USER_PATHS = NO; 336 | CLANG_ANALYZER_NONNULL = YES; 337 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 338 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 339 | CLANG_CXX_LIBRARY = "libc++"; 340 | CLANG_ENABLE_MODULES = YES; 341 | CLANG_ENABLE_OBJC_ARC = YES; 342 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 343 | CLANG_WARN_BOOL_CONVERSION = YES; 344 | CLANG_WARN_COMMA = YES; 345 | CLANG_WARN_CONSTANT_CONVERSION = YES; 346 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 347 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 348 | CLANG_WARN_EMPTY_BODY = YES; 349 | CLANG_WARN_ENUM_CONVERSION = YES; 350 | CLANG_WARN_INFINITE_RECURSION = YES; 351 | CLANG_WARN_INT_CONVERSION = YES; 352 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 353 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 354 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 355 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 356 | CLANG_WARN_STRICT_PROTOTYPES = YES; 357 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 358 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 359 | CLANG_WARN_UNREACHABLE_CODE = YES; 360 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 361 | CODE_SIGN_IDENTITY = "iPhone Developer"; 362 | COPY_PHASE_STRIP = NO; 363 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 364 | ENABLE_NS_ASSERTIONS = NO; 365 | ENABLE_STRICT_OBJC_MSGSEND = YES; 366 | GCC_C_LANGUAGE_STANDARD = gnu11; 367 | GCC_NO_COMMON_BLOCKS = YES; 368 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 369 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 370 | GCC_WARN_UNDECLARED_SELECTOR = YES; 371 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 372 | GCC_WARN_UNUSED_FUNCTION = YES; 373 | GCC_WARN_UNUSED_VARIABLE = YES; 374 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 375 | MTL_ENABLE_DEBUG_INFO = NO; 376 | SDKROOT = iphoneos; 377 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 378 | VALIDATE_PRODUCT = YES; 379 | }; 380 | name = Release; 381 | }; 382 | DAAE9AD91FA8F473005ED21F /* Debug */ = { 383 | isa = XCBuildConfiguration; 384 | baseConfigurationReference = A7B6FAA7F2052E29BCE273B8 /* Pods-HeroApplication.debug.xcconfig */; 385 | buildSettings = { 386 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 387 | CODE_SIGN_STYLE = Automatic; 388 | DEVELOPMENT_TEAM = NTP2A7PJM8; 389 | INFOPLIST_FILE = HeroApplication/Info.plist; 390 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 391 | PRODUCT_BUNDLE_IDENTIFIER = com.garytokman.HeroApplication; 392 | PRODUCT_NAME = "$(TARGET_NAME)"; 393 | SWIFT_VERSION = 4.0; 394 | TARGETED_DEVICE_FAMILY = "1,2"; 395 | }; 396 | name = Debug; 397 | }; 398 | DAAE9ADA1FA8F473005ED21F /* Release */ = { 399 | isa = XCBuildConfiguration; 400 | baseConfigurationReference = E2C3D0E4C439F02ABE40C821 /* Pods-HeroApplication.release.xcconfig */; 401 | buildSettings = { 402 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 403 | CODE_SIGN_STYLE = Automatic; 404 | DEVELOPMENT_TEAM = NTP2A7PJM8; 405 | INFOPLIST_FILE = HeroApplication/Info.plist; 406 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 407 | PRODUCT_BUNDLE_IDENTIFIER = com.garytokman.HeroApplication; 408 | PRODUCT_NAME = "$(TARGET_NAME)"; 409 | SWIFT_VERSION = 4.0; 410 | TARGETED_DEVICE_FAMILY = "1,2"; 411 | }; 412 | name = Release; 413 | }; 414 | /* End XCBuildConfiguration section */ 415 | 416 | /* Begin XCConfigurationList section */ 417 | DAAE9AC11FA8F473005ED21F /* Build configuration list for PBXProject "HeroApplication" */ = { 418 | isa = XCConfigurationList; 419 | buildConfigurations = ( 420 | DAAE9AD61FA8F473005ED21F /* Debug */, 421 | DAAE9AD71FA8F473005ED21F /* Release */, 422 | ); 423 | defaultConfigurationIsVisible = 0; 424 | defaultConfigurationName = Release; 425 | }; 426 | DAAE9AD81FA8F473005ED21F /* Build configuration list for PBXNativeTarget "HeroApplication" */ = { 427 | isa = XCConfigurationList; 428 | buildConfigurations = ( 429 | DAAE9AD91FA8F473005ED21F /* Debug */, 430 | DAAE9ADA1FA8F473005ED21F /* Release */, 431 | ); 432 | defaultConfigurationIsVisible = 0; 433 | defaultConfigurationName = Release; 434 | }; 435 | /* End XCConfigurationList section */ 436 | }; 437 | rootObject = DAAE9ABE1FA8F473005ED21F /* Project object */; 438 | } 439 | -------------------------------------------------------------------------------- /HeroApplication.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /HeroApplication/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // HeroApplication 4 | // 5 | // Created by Gary Tokman on 10/31/17. 6 | // Copyright © 2017 Gary Tokman. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /HeroApplication/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 | } -------------------------------------------------------------------------------- /HeroApplication/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /HeroApplication/Assets.xcassets/Images/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /HeroApplication/Assets.xcassets/Images/Image-1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Image-1.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 | } -------------------------------------------------------------------------------- /HeroApplication/Assets.xcassets/Images/Image-1.imageset/Image-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gtokman/Hero-Example/aca71d74674c9a8547bfac814e006cd88d2ac3da/HeroApplication/Assets.xcassets/Images/Image-1.imageset/Image-1.jpg -------------------------------------------------------------------------------- /HeroApplication/Assets.xcassets/Images/Image-2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Image-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 | } -------------------------------------------------------------------------------- /HeroApplication/Assets.xcassets/Images/Image-2.imageset/Image-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gtokman/Hero-Example/aca71d74674c9a8547bfac814e006cd88d2ac3da/HeroApplication/Assets.xcassets/Images/Image-2.imageset/Image-2.jpg -------------------------------------------------------------------------------- /HeroApplication/Assets.xcassets/Images/Image-3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Image-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 | } -------------------------------------------------------------------------------- /HeroApplication/Assets.xcassets/Images/Image-3.imageset/Image-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gtokman/Hero-Example/aca71d74674c9a8547bfac814e006cd88d2ac3da/HeroApplication/Assets.xcassets/Images/Image-3.imageset/Image-3.jpg -------------------------------------------------------------------------------- /HeroApplication/Assets.xcassets/Images/Image-4.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Image-4.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 | } -------------------------------------------------------------------------------- /HeroApplication/Assets.xcassets/Images/Image-4.imageset/Image-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gtokman/Hero-Example/aca71d74674c9a8547bfac814e006cd88d2ac3da/HeroApplication/Assets.xcassets/Images/Image-4.imageset/Image-4.jpg -------------------------------------------------------------------------------- /HeroApplication/Assets.xcassets/Images/Image-5.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Image-5.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 | } -------------------------------------------------------------------------------- /HeroApplication/Assets.xcassets/Images/Image-5.imageset/Image-5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gtokman/Hero-Example/aca71d74674c9a8547bfac814e006cd88d2ac3da/HeroApplication/Assets.xcassets/Images/Image-5.imageset/Image-5.jpg -------------------------------------------------------------------------------- /HeroApplication/Assets.xcassets/Images/Image-6.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Image-6.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 | } -------------------------------------------------------------------------------- /HeroApplication/Assets.xcassets/Images/Image-6.imageset/Image-6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gtokman/Hero-Example/aca71d74674c9a8547bfac814e006cd88d2ac3da/HeroApplication/Assets.xcassets/Images/Image-6.imageset/Image-6.jpg -------------------------------------------------------------------------------- /HeroApplication/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 | -------------------------------------------------------------------------------- /HeroApplication/Base.lproj/Main.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 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | -------------------------------------------------------------------------------- /HeroApplication/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 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /HeroApplication/Model/Image.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Image.swift 3 | // TestHero 4 | // 5 | // Created by Gary Tokman on 10/31/17. 6 | // Copyright © 2017 Gary Tokman. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | struct Image { 12 | let id: String 13 | let description: String 14 | } 15 | 16 | final class ImageFactory { 17 | var images = [Image]() 18 | 19 | init() { 20 | loadImages() 21 | } 22 | 23 | var count: Int { 24 | return images.count 25 | } 26 | 27 | func loadImages() { 28 | for i in 1...6 { 29 | let image = Image(id: "Image-\(i)", description: "Image-\(i)") 30 | images.append(image) 31 | } 32 | } 33 | 34 | func image(at indexPath: IndexPath) -> Image { 35 | return images[indexPath.row] 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /HeroApplication/TableView/DetailViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DetailViewController.swift 3 | // HeroApplication 4 | // 5 | // Created by Gary Tokman on 10/31/17. 6 | // Copyright © 2017 Gary Tokman. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Hero 11 | 12 | class DetailViewController: UIViewController { 13 | 14 | // MARK: - Outlets 15 | 16 | @IBOutlet var detailImageView: UIImageView! 17 | 18 | var unsplashImage: Image? 19 | 20 | override func viewDidLoad() { 21 | super.viewDidLoad() 22 | 23 | // Do any additional setup after loading the view. 24 | if let image = unsplashImage { 25 | detailImageView.image = UIImage(named: image.id) 26 | } 27 | } 28 | 29 | // MARK: - Actions 30 | 31 | @IBAction func handlePan(_ sender: UIPanGestureRecognizer) { 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /HeroApplication/TableView/ImageCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ImageCell.swift 3 | // HeroApplication 4 | // 5 | // Created by Gary Tokman on 10/31/17. 6 | // Copyright © 2017 Gary Tokman. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Hero 11 | 12 | class ImageCell: UITableViewCell { 13 | 14 | // MARK: - Outlets 15 | 16 | @IBOutlet weak var cellImageView: UIImageView! 17 | 18 | var unsplashImage: Image? { 19 | didSet { 20 | cellImageView.image = UIImage(named: unsplashImage!.id) 21 | } 22 | } 23 | 24 | override func awakeFromNib() { 25 | super.awakeFromNib() 26 | // Initialization code 27 | } 28 | 29 | override func setSelected(_ selected: Bool, animated: Bool) { 30 | super.setSelected(selected, animated: animated) 31 | 32 | // Configure the view for the selected state 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /HeroApplication/TableView/TableViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TableViewController.swift 3 | // HeroApplication 4 | // 5 | // Created by Gary Tokman on 10/31/17. 6 | // Copyright © 2017 Gary Tokman. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class TableViewController: UITableViewController { 12 | 13 | private let imageFactory = ImageFactory() 14 | 15 | // MARK: - Table view data source 16 | 17 | override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 18 | // #warning Incomplete implementation, return the number of rows 19 | return imageFactory.count 20 | } 21 | 22 | override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 23 | let cell = tableView.dequeueReusableCell(withIdentifier: "ImageCell", for: indexPath) as! ImageCell 24 | 25 | // Configure the cell... 26 | let image = imageFactory.image(at: indexPath) 27 | cell.unsplashImage = image 28 | 29 | return cell 30 | } 31 | 32 | // MARK: - Navigation 33 | 34 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 35 | if let cell = sender as? ImageCell, let detailViewController = segue.destination as? DetailViewController { 36 | detailViewController.unsplashImage = cell.unsplashImage 37 | } 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | platform :ios, '9.0' 3 | 4 | target 'HeroApplication' do 5 | # Comment the next line if you're not using Swift and don't want to use dynamic frameworks 6 | use_frameworks! 7 | 8 | # Pods for HeroApplication 9 | pod 'Hero' 10 | 11 | end 12 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Hero (1.0.0) 3 | 4 | DEPENDENCIES: 5 | - Hero 6 | 7 | SPEC CHECKSUMS: 8 | Hero: 18e7cf8af41c04c8532d1430ac174004a9365c87 9 | 10 | PODFILE CHECKSUM: 9f415ef0e7ddf6e46e9fe707a8997b35a5abc86f 11 | 12 | COCOAPODS: 1.3.1 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

Hero Framework Tutorial: Add Elegant Transitions in iOS 11

2 | 3 | ## Demo 4 | 5 | 6 | 7 | ### What you will learn: 8 | - Transitions 9 | - [Hero Library](https://github.com/lkzhao/Hero) 10 | --------------------------------------------------------------------------------