diff --git a/Prototype/Prototype.xcodeproj/project.pbxproj b/Prototype/Prototype.xcodeproj/project.pbxproj new file mode 100644 index 0000000..f2557ff --- /dev/null +++ b/Prototype/Prototype.xcodeproj/project.pbxproj @@ -0,0 +1,350 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 77; + objects = { + +/* Begin PBXFileReference section */ + 23D1B07C2F16A15A00A8C8BF /* Prototype.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Prototype.app; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */ + 23D1B08E2F16A15C00A8C8BF /* Exceptions for "Prototype" folder in "Prototype" target */ = { + isa = PBXFileSystemSynchronizedBuildFileExceptionSet; + membershipExceptions = ( + Info.plist, + ); + target = 23D1B07B2F16A15A00A8C8BF /* Prototype */; + }; +/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */ + +/* Begin PBXFileSystemSynchronizedRootGroup section */ + 23D1B07E2F16A15A00A8C8BF /* Prototype */ = { + isa = PBXFileSystemSynchronizedRootGroup; + exceptions = ( + 23D1B08E2F16A15C00A8C8BF /* Exceptions for "Prototype" folder in "Prototype" target */, + ); + path = Prototype; + sourceTree = ""; + }; +/* End PBXFileSystemSynchronizedRootGroup section */ + +/* Begin PBXFrameworksBuildPhase section */ + 23D1B0792F16A15A00A8C8BF /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 23D1B0732F16A15A00A8C8BF = { + isa = PBXGroup; + children = ( + 23D1B07E2F16A15A00A8C8BF /* Prototype */, + 23D1B07D2F16A15A00A8C8BF /* Products */, + ); + sourceTree = ""; + }; + 23D1B07D2F16A15A00A8C8BF /* Products */ = { + isa = PBXGroup; + children = ( + 23D1B07C2F16A15A00A8C8BF /* Prototype.app */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 23D1B07B2F16A15A00A8C8BF /* Prototype */ = { + isa = PBXNativeTarget; + buildConfigurationList = 23D1B08F2F16A15C00A8C8BF /* Build configuration list for PBXNativeTarget "Prototype" */; + buildPhases = ( + 23D1B0782F16A15A00A8C8BF /* Sources */, + 23D1B0792F16A15A00A8C8BF /* Frameworks */, + 23D1B07A2F16A15A00A8C8BF /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + fileSystemSynchronizedGroups = ( + 23D1B07E2F16A15A00A8C8BF /* Prototype */, + ); + name = Prototype; + packageProductDependencies = ( + ); + productName = Prototype; + productReference = 23D1B07C2F16A15A00A8C8BF /* Prototype.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 23D1B0742F16A15A00A8C8BF /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 2600; + LastUpgradeCheck = 2600; + TargetAttributes = { + 23D1B07B2F16A15A00A8C8BF = { + CreatedOnToolsVersion = 26.0.1; + }; + }; + }; + buildConfigurationList = 23D1B0772F16A15A00A8C8BF /* Build configuration list for PBXProject "Prototype" */; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 23D1B0732F16A15A00A8C8BF; + minimizedProjectReferenceProxies = 1; + preferredProjectObjectVersion = 77; + productRefGroup = 23D1B07D2F16A15A00A8C8BF /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 23D1B07B2F16A15A00A8C8BF /* Prototype */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 23D1B07A2F16A15A00A8C8BF /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 23D1B0782F16A15A00A8C8BF /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 23D1B0902F16A15C00A8C8BF /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = YLLF7E9854; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Prototype/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.dapeter.EssentialFeed.Prototype; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRING_CATALOG_GENERATE_SYMBOLS = YES; + SWIFT_APPROACHABLE_CONCURRENCY = YES; + SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 23D1B0912F16A15C00A8C8BF /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = YLLF7E9854; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Prototype/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.dapeter.EssentialFeed.Prototype; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRING_CATALOG_GENERATE_SYMBOLS = YES; + SWIFT_APPROACHABLE_CONCURRENCY = YES; + SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 23D1B0922F16A15C00A8C8BF /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + DEVELOPMENT_TEAM = YLLF7E9854; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 26.0; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 23D1B0932F16A15C00A8C8BF /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = YLLF7E9854; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 26.0; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 23D1B0772F16A15A00A8C8BF /* Build configuration list for PBXProject "Prototype" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 23D1B0922F16A15C00A8C8BF /* Debug */, + 23D1B0932F16A15C00A8C8BF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 23D1B08F2F16A15C00A8C8BF /* Build configuration list for PBXNativeTarget "Prototype" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 23D1B0902F16A15C00A8C8BF /* Debug */, + 23D1B0912F16A15C00A8C8BF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 23D1B0742F16A15A00A8C8BF /* Project object */; +} diff --git a/Prototype/Prototype.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Prototype/Prototype.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/Prototype/Prototype.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Prototype/Prototype/AppDelegate.swift b/Prototype/Prototype/AppDelegate.swift new file mode 100644 index 0000000..b1f514d --- /dev/null +++ b/Prototype/Prototype/AppDelegate.swift @@ -0,0 +1,36 @@ +// +// AppDelegate.swift +// Prototype +// +// Created by Andres Sanchez on 13/1/26. +// + +import UIKit + +@main +class AppDelegate: UIResponder, UIApplicationDelegate { + + + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + // MARK: UISceneSession Lifecycle + + func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { + // Called when a new scene session is being created. + // Use this method to select a configuration to create the new scene with. + return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) + } + + func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { + // Called when the user discards a scene session. + // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. + // Use this method to release any resources that were specific to the discarded scenes, as they will not return. + } + + +} + diff --git a/Prototype/Prototype/Assets.xcassets/AccentColor.colorset/Contents.json b/Prototype/Prototype/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Prototype/Prototype/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Prototype/Prototype/Assets.xcassets/AppIcon.appiconset/Contents.json b/Prototype/Prototype/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..82f5bf1 --- /dev/null +++ b/Prototype/Prototype/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,14 @@ +{ + "images" : [ + { + "filename" : "Icon-1024.png", + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Prototype/Prototype/Assets.xcassets/AppIcon.appiconset/Icon-1024.png b/Prototype/Prototype/Assets.xcassets/AppIcon.appiconset/Icon-1024.png new file mode 100644 index 0000000..946eaa9 Binary files /dev/null and b/Prototype/Prototype/Assets.xcassets/AppIcon.appiconset/Icon-1024.png differ diff --git a/Prototype/Prototype/Assets.xcassets/Contents.json b/Prototype/Prototype/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Prototype/Prototype/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Prototype/Prototype/Assets.xcassets/image-0.imageset/Contents.json b/Prototype/Prototype/Assets.xcassets/image-0.imageset/Contents.json new file mode 100644 index 0000000..044adfc --- /dev/null +++ b/Prototype/Prototype/Assets.xcassets/image-0.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "image-0.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Prototype/Prototype/Assets.xcassets/image-0.imageset/image-0.jpg b/Prototype/Prototype/Assets.xcassets/image-0.imageset/image-0.jpg new file mode 100644 index 0000000..5430479 Binary files /dev/null and b/Prototype/Prototype/Assets.xcassets/image-0.imageset/image-0.jpg differ diff --git a/Prototype/Prototype/Assets.xcassets/image-1.imageset/Contents.json b/Prototype/Prototype/Assets.xcassets/image-1.imageset/Contents.json new file mode 100644 index 0000000..b0b39ec --- /dev/null +++ b/Prototype/Prototype/Assets.xcassets/image-1.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "image-1.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Prototype/Prototype/Assets.xcassets/image-1.imageset/image-1.jpg b/Prototype/Prototype/Assets.xcassets/image-1.imageset/image-1.jpg new file mode 100644 index 0000000..10bef47 Binary files /dev/null and b/Prototype/Prototype/Assets.xcassets/image-1.imageset/image-1.jpg differ diff --git a/Prototype/Prototype/Assets.xcassets/image-2.imageset/Contents.json b/Prototype/Prototype/Assets.xcassets/image-2.imageset/Contents.json new file mode 100644 index 0000000..fde9a98 --- /dev/null +++ b/Prototype/Prototype/Assets.xcassets/image-2.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "image-2.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Prototype/Prototype/Assets.xcassets/image-2.imageset/image-2.jpg b/Prototype/Prototype/Assets.xcassets/image-2.imageset/image-2.jpg new file mode 100644 index 0000000..233c8f5 Binary files /dev/null and b/Prototype/Prototype/Assets.xcassets/image-2.imageset/image-2.jpg differ diff --git a/Prototype/Prototype/Assets.xcassets/image-3.imageset/Contents.json b/Prototype/Prototype/Assets.xcassets/image-3.imageset/Contents.json new file mode 100644 index 0000000..455757b --- /dev/null +++ b/Prototype/Prototype/Assets.xcassets/image-3.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "image-3.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Prototype/Prototype/Assets.xcassets/image-3.imageset/image-3.jpg b/Prototype/Prototype/Assets.xcassets/image-3.imageset/image-3.jpg new file mode 100644 index 0000000..6c40d62 Binary files /dev/null and b/Prototype/Prototype/Assets.xcassets/image-3.imageset/image-3.jpg differ diff --git a/Prototype/Prototype/Assets.xcassets/image-4.imageset/Contents.json b/Prototype/Prototype/Assets.xcassets/image-4.imageset/Contents.json new file mode 100644 index 0000000..049c6c2 --- /dev/null +++ b/Prototype/Prototype/Assets.xcassets/image-4.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "image-4.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Prototype/Prototype/Assets.xcassets/image-4.imageset/image-4.jpg b/Prototype/Prototype/Assets.xcassets/image-4.imageset/image-4.jpg new file mode 100644 index 0000000..fea17fd Binary files /dev/null and b/Prototype/Prototype/Assets.xcassets/image-4.imageset/image-4.jpg differ diff --git a/Prototype/Prototype/Assets.xcassets/image-5.imageset/Contents.json b/Prototype/Prototype/Assets.xcassets/image-5.imageset/Contents.json new file mode 100644 index 0000000..6c2a924 --- /dev/null +++ b/Prototype/Prototype/Assets.xcassets/image-5.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "image-5.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Prototype/Prototype/Assets.xcassets/image-5.imageset/image-5.jpg b/Prototype/Prototype/Assets.xcassets/image-5.imageset/image-5.jpg new file mode 100644 index 0000000..685196a Binary files /dev/null and b/Prototype/Prototype/Assets.xcassets/image-5.imageset/image-5.jpg differ diff --git a/Prototype/Prototype/Assets.xcassets/pin.imageset/Contents.json b/Prototype/Prototype/Assets.xcassets/pin.imageset/Contents.json new file mode 100644 index 0000000..ab7c630 --- /dev/null +++ b/Prototype/Prototype/Assets.xcassets/pin.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "pin.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "pin@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "pin@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Prototype/Prototype/Assets.xcassets/pin.imageset/pin.png b/Prototype/Prototype/Assets.xcassets/pin.imageset/pin.png new file mode 100644 index 0000000..6acdd61 Binary files /dev/null and b/Prototype/Prototype/Assets.xcassets/pin.imageset/pin.png differ diff --git a/Prototype/Prototype/Assets.xcassets/pin.imageset/pin@2x.png b/Prototype/Prototype/Assets.xcassets/pin.imageset/pin@2x.png new file mode 100644 index 0000000..770daef Binary files /dev/null and b/Prototype/Prototype/Assets.xcassets/pin.imageset/pin@2x.png differ diff --git a/Prototype/Prototype/Assets.xcassets/pin.imageset/pin@3x.png b/Prototype/Prototype/Assets.xcassets/pin.imageset/pin@3x.png new file mode 100644 index 0000000..b1b2b54 Binary files /dev/null and b/Prototype/Prototype/Assets.xcassets/pin.imageset/pin@3x.png differ diff --git a/Prototype/Prototype/Base.lproj/LaunchScreen.storyboard b/Prototype/Prototype/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/Prototype/Prototype/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Prototype/Prototype/Base.lproj/Main.storyboard b/Prototype/Prototype/Base.lproj/Main.storyboard new file mode 100644 index 0000000..c7bf2ae --- /dev/null +++ b/Prototype/Prototype/Base.lproj/Main.storyboard @@ -0,0 +1,155 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Prototype/Prototype/FeedImageCell.swift b/Prototype/Prototype/FeedImageCell.swift new file mode 100644 index 0000000..6bb48be --- /dev/null +++ b/Prototype/Prototype/FeedImageCell.swift @@ -0,0 +1,39 @@ +// +// FeedImageCell.swift +// Prototype +// +// Created by Andres Sanchez on 13/1/26. +// + +import UIKit + +final class FeedImageCell: UITableViewCell { + @IBOutlet private(set) var locationContainer: UIView! + @IBOutlet private(set) var locationLabel: UILabel! + @IBOutlet private(set) var feedImageView: UIImageView! + @IBOutlet private(set) var descriptionLabel: UILabel! + + override func awakeFromNib() { + super.awakeFromNib() + + feedImageView.alpha = 0 + } + + override func prepareForReuse() { + super.prepareForReuse() + + feedImageView.alpha = 0 + } + + func fadeIn(_ image: UIImage?) { + feedImageView.image = image + + UIView.animate( + withDuration: 0.3, + delay: 0.3, + options: [], + animations: { + self.feedImageView.alpha = 1 + }) + } +} diff --git a/Prototype/Prototype/FeedImageViewModel+PrototypeData.swift b/Prototype/Prototype/FeedImageViewModel+PrototypeData.swift new file mode 100644 index 0000000..97d075c --- /dev/null +++ b/Prototype/Prototype/FeedImageViewModel+PrototypeData.swift @@ -0,0 +1,45 @@ +// +// FeedImageViewModel+PrototypeData.swift +// Prototype +// +// Created by Andres Sanchez on 13/1/26. +// + +import Foundation + +extension FeedImageViewModel { + static var prototypeFeed: [FeedImageViewModel] { + return [ + FeedImageViewModel( + description: "The East Side Gallery is an open-air gallery in Berlin. It consists of a series of murals painted directly on a 1,316 m long remnant of the Berlin Wall, located near the centre of Berlin, on Mühlenstraße in Friedrichshain-Kreuzberg. The gallery has official status as a Denkmal, or heritage-protected landmark.", + location: "East Side Gallery\nMemorial in Berlin, Germany", + imageName: "image-0" + ), + FeedImageViewModel( + description: nil, + location: "Cannon Street, London", + imageName: "image-1" + ), + FeedImageViewModel( + description: "The Desert Island in Faro is beautiful!! ☀️", + location: nil, + imageName: "image-2" + ), + FeedImageViewModel( + description: nil, + location: nil, + imageName: "image-3" + ), + FeedImageViewModel( + description: "Garth Pier is a Grade II listed structure in Bangor, Gwynedd, North Wales. At 1,500 feet in length, it is the second-longest pier in Wales, and the ninth longest in the British Isles.", + location: "Garth Pier\nNorth Wales", + imageName: "image-4" + ), + FeedImageViewModel( + description: "Glorious day in Brighton!! 🎢", + location: "Brighton Seafront", + imageName: "image-5" + ) + ] + } +} diff --git a/Prototype/Prototype/FeedViewController.swift b/Prototype/Prototype/FeedViewController.swift new file mode 100644 index 0000000..f9651d0 --- /dev/null +++ b/Prototype/Prototype/FeedViewController.swift @@ -0,0 +1,42 @@ +// +// FeedViewController.swift +// Prototype +// +// Created by Andres Sanchez on 13/1/26. +// + +import UIKit + +struct FeedImageViewModel { + let description: String? + let location: String? + let imageName: String +} + +final class FeedViewController: UITableViewController { + private let feed = FeedImageViewModel.prototypeFeed + + override func tableView(_ tableView: UITableView, + numberOfRowsInSection section: Int) -> Int { + return feed.count + } + + override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell = tableView.dequeueReusableCell(withIdentifier: "FeedImageCell", for: indexPath) as! FeedImageCell + let model = feed[indexPath.row] + cell.configure(with: model) + return cell + } +} + +extension FeedImageCell { + func configure(with model: FeedImageViewModel) { + locationLabel.text = model.location + locationContainer.isHidden = model.location == nil + + descriptionLabel.text = model.description + descriptionLabel.isHidden = model.description == nil + + fadeIn(UIImage(named: model.imageName)) + } +} diff --git a/Prototype/Prototype/Info.plist b/Prototype/Prototype/Info.plist new file mode 100644 index 0000000..dd3c9af --- /dev/null +++ b/Prototype/Prototype/Info.plist @@ -0,0 +1,25 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + UISceneStoryboardFile + Main + + + + + + diff --git a/Prototype/Prototype/SceneDelegate.swift b/Prototype/Prototype/SceneDelegate.swift new file mode 100644 index 0000000..af46415 --- /dev/null +++ b/Prototype/Prototype/SceneDelegate.swift @@ -0,0 +1,52 @@ +// +// SceneDelegate.swift +// Prototype +// +// Created by Andres Sanchez on 13/1/26. +// + +import UIKit + +class SceneDelegate: UIResponder, UIWindowSceneDelegate { + + var window: UIWindow? + + + func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { + // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. + // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. + // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). + guard let _ = (scene as? UIWindowScene) else { return } + } + + func sceneDidDisconnect(_ scene: UIScene) { + // Called as the scene is being released by the system. + // This occurs shortly after the scene enters the background, or when its session is discarded. + // Release any resources associated with this scene that can be re-created the next time the scene connects. + // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead). + } + + func sceneDidBecomeActive(_ scene: UIScene) { + // Called when the scene has moved from an inactive state to an active state. + // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. + } + + func sceneWillResignActive(_ scene: UIScene) { + // Called when the scene will move from an active state to an inactive state. + // This may occur due to temporary interruptions (ex. an incoming phone call). + } + + func sceneWillEnterForeground(_ scene: UIScene) { + // Called as the scene transitions from the background to the foreground. + // Use this method to undo the changes made on entering the background. + } + + func sceneDidEnterBackground(_ scene: UIScene) { + // Called as the scene transitions from the foreground to the background. + // Use this method to save data, release shared resources, and store enough scene-specific state information + // to restore the scene back to its current state. + } + + +} +