diff --git a/week_04/week_04.xcodeproj/project.pbxproj b/week_04/week_04.xcodeproj/project.pbxproj new file mode 100644 index 0000000..9532ac7 --- /dev/null +++ b/week_04/week_04.xcodeproj/project.pbxproj @@ -0,0 +1,385 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 77; + objects = { + +/* Begin PBXBuildFile section */ + 3AA11F8A2EE7FF1200621FA2 /* Then in Frameworks */ = {isa = PBXBuildFile; productRef = 3AA11F892EE7FF1200621FA2 /* Then */; }; + 3AA11F8D2EE7FF1E00621FA2 /* SnapKit in Frameworks */ = {isa = PBXBuildFile; productRef = 3AA11F8C2EE7FF1E00621FA2 /* SnapKit */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 3AA11F6A2EE7FE0800621FA2 /* week_04.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = week_04.app; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */ + 3AA11F7C2EE7FE0B00621FA2 /* Exceptions for "week_04" folder in "week_04" target */ = { + isa = PBXFileSystemSynchronizedBuildFileExceptionSet; + membershipExceptions = ( + Info.plist, + ); + target = 3AA11F692EE7FE0800621FA2 /* week_04 */; + }; +/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */ + +/* Begin PBXFileSystemSynchronizedRootGroup section */ + 3AA11F6C2EE7FE0800621FA2 /* week_04 */ = { + isa = PBXFileSystemSynchronizedRootGroup; + exceptions = ( + 3AA11F7C2EE7FE0B00621FA2 /* Exceptions for "week_04" folder in "week_04" target */, + ); + path = week_04; + sourceTree = ""; + }; +/* End PBXFileSystemSynchronizedRootGroup section */ + +/* Begin PBXFrameworksBuildPhase section */ + 3AA11F672EE7FE0800621FA2 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 3AA11F8A2EE7FF1200621FA2 /* Then in Frameworks */, + 3AA11F8D2EE7FF1E00621FA2 /* SnapKit in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 3AA11F612EE7FE0800621FA2 = { + isa = PBXGroup; + children = ( + 3AA11F6C2EE7FE0800621FA2 /* week_04 */, + 3AA11F6B2EE7FE0800621FA2 /* Products */, + ); + sourceTree = ""; + }; + 3AA11F6B2EE7FE0800621FA2 /* Products */ = { + isa = PBXGroup; + children = ( + 3AA11F6A2EE7FE0800621FA2 /* week_04.app */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 3AA11F692EE7FE0800621FA2 /* week_04 */ = { + isa = PBXNativeTarget; + buildConfigurationList = 3AA11F7D2EE7FE0B00621FA2 /* Build configuration list for PBXNativeTarget "week_04" */; + buildPhases = ( + 3AA11F662EE7FE0800621FA2 /* Sources */, + 3AA11F672EE7FE0800621FA2 /* Frameworks */, + 3AA11F682EE7FE0800621FA2 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + fileSystemSynchronizedGroups = ( + 3AA11F6C2EE7FE0800621FA2 /* week_04 */, + ); + name = week_04; + packageProductDependencies = ( + 3AA11F892EE7FF1200621FA2 /* Then */, + 3AA11F8C2EE7FF1E00621FA2 /* SnapKit */, + ); + productName = week_04; + productReference = 3AA11F6A2EE7FE0800621FA2 /* week_04.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 3AA11F622EE7FE0800621FA2 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1640; + LastUpgradeCheck = 1640; + TargetAttributes = { + 3AA11F692EE7FE0800621FA2 = { + CreatedOnToolsVersion = 16.4; + }; + }; + }; + buildConfigurationList = 3AA11F652EE7FE0800621FA2 /* Build configuration list for PBXProject "week_04" */; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 3AA11F612EE7FE0800621FA2; + minimizedProjectReferenceProxies = 1; + packageReferences = ( + 3AA11F882EE7FF1200621FA2 /* XCRemoteSwiftPackageReference "Then" */, + 3AA11F8B2EE7FF1E00621FA2 /* XCRemoteSwiftPackageReference "SnapKit" */, + ); + preferredProjectObjectVersion = 77; + productRefGroup = 3AA11F6B2EE7FE0800621FA2 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 3AA11F692EE7FE0800621FA2 /* week_04 */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 3AA11F682EE7FE0800621FA2 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 3AA11F662EE7FE0800621FA2 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 3AA11F7E2EE7FE0B00621FA2 /* 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 = 25T76RX27Y; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = week_04/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + 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 = "-1.week-04"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 3AA11F7F2EE7FE0B00621FA2 /* 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 = 25T76RX27Y; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = week_04/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + 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 = "-1.week-04"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 3AA11F802EE7FE0B00621FA2 /* 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 = 25T76RX27Y; + 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 = 18.5; + 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; + }; + 3AA11F812EE7FE0B00621FA2 /* 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 = 25T76RX27Y; + 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 = 18.5; + 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 */ + 3AA11F652EE7FE0800621FA2 /* Build configuration list for PBXProject "week_04" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3AA11F802EE7FE0B00621FA2 /* Debug */, + 3AA11F812EE7FE0B00621FA2 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 3AA11F7D2EE7FE0B00621FA2 /* Build configuration list for PBXNativeTarget "week_04" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3AA11F7E2EE7FE0B00621FA2 /* Debug */, + 3AA11F7F2EE7FE0B00621FA2 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + 3AA11F882EE7FF1200621FA2 /* XCRemoteSwiftPackageReference "Then" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/devxoul/Then"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 3.0.0; + }; + }; + 3AA11F8B2EE7FF1E00621FA2 /* XCRemoteSwiftPackageReference "SnapKit" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/SnapKit/SnapKit.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 5.7.1; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 3AA11F892EE7FF1200621FA2 /* Then */ = { + isa = XCSwiftPackageProductDependency; + package = 3AA11F882EE7FF1200621FA2 /* XCRemoteSwiftPackageReference "Then" */; + productName = Then; + }; + 3AA11F8C2EE7FF1E00621FA2 /* SnapKit */ = { + isa = XCSwiftPackageProductDependency; + package = 3AA11F8B2EE7FF1E00621FA2 /* XCRemoteSwiftPackageReference "SnapKit" */; + productName = SnapKit; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = 3AA11F622EE7FE0800621FA2 /* Project object */; +} diff --git a/week_04/week_04.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/week_04/week_04.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/week_04/week_04.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/week_04/week_04.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/week_04/week_04.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 0000000..eaab9ca --- /dev/null +++ b/week_04/week_04.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,24 @@ +{ + "originHash" : "541e80f0ddad8813393bd38a3eff86a352de84879d39abdada48db8fb0d4e9ee", + "pins" : [ + { + "identity" : "snapkit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/SnapKit/SnapKit.git", + "state" : { + "revision" : "2842e6e84e82eb9a8dac0100ca90d9444b0307f4", + "version" : "5.7.1" + } + }, + { + "identity" : "then", + "kind" : "remoteSourceControl", + "location" : "https://github.com/devxoul/Then", + "state" : { + "revision" : "d41ef523faef0f911369f79c0b96815d9dbb6d7a", + "version" : "3.0.0" + } + } + ], + "version" : 3 +} diff --git a/week_04/week_04/App/AppDelegate.swift b/week_04/week_04/App/AppDelegate.swift new file mode 100644 index 0000000..337ad89 --- /dev/null +++ b/week_04/week_04/App/AppDelegate.swift @@ -0,0 +1,36 @@ +// +// AppDelegate.swift +// week_04 +// +// Created by 조영서 on 12/9/25. +// + +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/week_04/week_04/App/SceneDelegate.swift b/week_04/week_04/App/SceneDelegate.swift new file mode 100644 index 0000000..988a563 --- /dev/null +++ b/week_04/week_04/App/SceneDelegate.swift @@ -0,0 +1,57 @@ +// +// SceneDelegate.swift +// week_04 +// +// Created by 조영서 on 12/9/25. +// + +import UIKit + +class SceneDelegate: UIResponder, UIWindowSceneDelegate { + + var window: UIWindow? + + + func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { + + guard let windowScene = (scene as? UIWindowScene) else { return } + let window = UIWindow(windowScene: windowScene) + + let vc = UINavigationController(rootViewController: ProgressBarViewController()) + window.rootViewController = vc + self.window = window + + window.makeKeyAndVisible() + } + + 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. + } + + +} + diff --git a/week_04/week_04/Assets.xcassets/AccentColor.colorset/Contents.json b/week_04/week_04/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/week_04/week_04/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/week_04/week_04/Assets.xcassets/AppIcon.appiconset/Contents.json b/week_04/week_04/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..2305880 --- /dev/null +++ b/week_04/week_04/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,35 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "tinted" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/week_04/week_04/Assets.xcassets/Contents.json b/week_04/week_04/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/week_04/week_04/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/week_04/week_04/Assets.xcassets/IndigoNavy.colorset/Contents.json b/week_04/week_04/Assets.xcassets/IndigoNavy.colorset/Contents.json new file mode 100644 index 0000000..954ef20 --- /dev/null +++ b/week_04/week_04/Assets.xcassets/IndigoNavy.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x79", + "green" : "0x3D", + "red" : "0x33" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x79", + "green" : "0x3D", + "red" : "0x33" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/week_04/week_04/Assets.xcassets/SoftPink.colorset/Contents.json b/week_04/week_04/Assets.xcassets/SoftPink.colorset/Contents.json new file mode 100644 index 0000000..b4b1c93 --- /dev/null +++ b/week_04/week_04/Assets.xcassets/SoftPink.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xEF", + "green" : "0xEB", + "red" : "0xFA" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xEF", + "green" : "0xEB", + "red" : "0xFA" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/week_04/week_04/Assets.xcassets/img_gonyani_1.imageset/Contents.json b/week_04/week_04/Assets.xcassets/img_gonyani_1.imageset/Contents.json new file mode 100644 index 0000000..86bf162 --- /dev/null +++ b/week_04/week_04/Assets.xcassets/img_gonyani_1.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "img_gonyani_1.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/week_04/week_04/Assets.xcassets/img_gonyani_1.imageset/img_gonyani_1.png b/week_04/week_04/Assets.xcassets/img_gonyani_1.imageset/img_gonyani_1.png new file mode 100644 index 0000000..f1f4c3f Binary files /dev/null and b/week_04/week_04/Assets.xcassets/img_gonyani_1.imageset/img_gonyani_1.png differ diff --git a/week_04/week_04/Assets.xcassets/img_gonyani_2.imageset/Contents.json b/week_04/week_04/Assets.xcassets/img_gonyani_2.imageset/Contents.json new file mode 100644 index 0000000..341fd5b --- /dev/null +++ b/week_04/week_04/Assets.xcassets/img_gonyani_2.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "img_gonyani_2.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/week_04/week_04/Assets.xcassets/img_gonyani_2.imageset/img_gonyani_2.png b/week_04/week_04/Assets.xcassets/img_gonyani_2.imageset/img_gonyani_2.png new file mode 100644 index 0000000..44848ee Binary files /dev/null and b/week_04/week_04/Assets.xcassets/img_gonyani_2.imageset/img_gonyani_2.png differ diff --git a/week_04/week_04/Assets.xcassets/img_gonyani_3.imageset/Contents.json b/week_04/week_04/Assets.xcassets/img_gonyani_3.imageset/Contents.json new file mode 100644 index 0000000..152bf76 --- /dev/null +++ b/week_04/week_04/Assets.xcassets/img_gonyani_3.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "img_gonyani_3.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/week_04/week_04/Assets.xcassets/img_gonyani_3.imageset/img_gonyani_3.png b/week_04/week_04/Assets.xcassets/img_gonyani_3.imageset/img_gonyani_3.png new file mode 100644 index 0000000..38c7fb8 Binary files /dev/null and b/week_04/week_04/Assets.xcassets/img_gonyani_3.imageset/img_gonyani_3.png differ diff --git a/week_04/week_04/Extensions/UIStackView+.swift b/week_04/week_04/Extensions/UIStackView+.swift new file mode 100644 index 0000000..9c69e7f --- /dev/null +++ b/week_04/week_04/Extensions/UIStackView+.swift @@ -0,0 +1,15 @@ +// +// UIStackView+.swift +// week_04 +// +// Created by 조영서 on 12/9/25. +// + +import UIKit + +extension UIStackView { + + func addArrangedSubviews(_ views: UIView...) { + views.forEach { self.addArrangedSubview($0) } + } +} diff --git a/week_04/week_04/Extensions/UIView+.swift b/week_04/week_04/Extensions/UIView+.swift new file mode 100644 index 0000000..77ad2cb --- /dev/null +++ b/week_04/week_04/Extensions/UIView+.swift @@ -0,0 +1,15 @@ +// +// UIView+.swift +// week_04 +// +// Created by 조영서 on 12/9/25. +// + +import UIKit + +extension UIView { + + func addSubviews(_ views: UIView...) { + views.forEach { self.addSubview($0) } + } +} diff --git a/week_04/week_04/Info.plist b/week_04/week_04/Info.plist new file mode 100644 index 0000000..0eb786d --- /dev/null +++ b/week_04/week_04/Info.plist @@ -0,0 +1,23 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + + + + + + diff --git a/week_04/week_04/Presentations/ProgressBarViewController.swift b/week_04/week_04/Presentations/ProgressBarViewController.swift new file mode 100644 index 0000000..479fb6e --- /dev/null +++ b/week_04/week_04/Presentations/ProgressBarViewController.swift @@ -0,0 +1,84 @@ +// +// ProgressBarViewController.swift +// week_04 +// +// Created by 조영서 on 12/9/25. +// + +import UIKit + +import SnapKit +import Then + +final class ProgressBarViewController: UIViewController { + + // MARK: - UI Components + + private let circleLayer = CAShapeLayer() + private let progressLayer = CAShapeLayer() + + // MARK: - Properties + + private let startAngle = -CGFloat.pi / 2 + private let endAngle = 3 * CGFloat.pi / 2 + private let progressSize: CGFloat = 140 + + // MARK: - Lifecycle + + override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = .white + setupCircularPath() + startProgressAnimation() + } + + // MARK: - Private Methods + + private func setupCircularPath() { + let center = CGPoint( + x: view.bounds.width / 2, + y: view.bounds.height / 2 + ) + + let radius = progressSize / 2 + + let path = UIBezierPath( + arcCenter: center, + radius: radius, + startAngle: startAngle, + endAngle: endAngle, + clockwise: true + ) + + setupLayers(with: path.cgPath) + } + + private func setupLayers(with path: CGPath) { + circleLayer.path = path + circleLayer.fillColor = UIColor.clear.cgColor + circleLayer.strokeColor = UIColor.softPink.cgColor + circleLayer.lineWidth = 8 + circleLayer.lineCap = .round + view.layer.addSublayer(circleLayer) + + progressLayer.path = path + progressLayer.fillColor = UIColor.clear.cgColor + progressLayer.strokeColor = UIColor.indigoNavy.cgColor + progressLayer.lineWidth = 8 + progressLayer.lineCap = .round + progressLayer.strokeEnd = 0 + view.layer.addSublayer(progressLayer) + } + + private func startProgressAnimation() { + let animation = CABasicAnimation(keyPath: "strokeEnd") + animation.fromValue = 0 + animation.toValue = 1 + animation.duration = 2.5 + animation.repeatCount = .infinity + animation.timingFunction = CAMediaTimingFunction(name: .linear) + animation.isRemovedOnCompletion = false + + progressLayer.add(animation, forKey: "ProgressAnimation") + } +} diff --git a/week_04/week_04/Presentations/SkeletonViewController.swift b/week_04/week_04/Presentations/SkeletonViewController.swift new file mode 100644 index 0000000..765288d --- /dev/null +++ b/week_04/week_04/Presentations/SkeletonViewController.swift @@ -0,0 +1,116 @@ +// +// SkeletonViewController.swift +// week_04 +// +// Created by 조영서 on 12/9/25. +// + +import UIKit + +import SnapKit +import Then + +final class SkeletonViewController: UIViewController { + + // MARK: - Properties + + private var isSkeletonActive = false + + // MARK: - UI Components + + private let gonyaniImageView = UIImageView().then { + $0.contentMode = .scaleAspectFit + $0.backgroundColor = .gray + } + + private let loadingLabel = UILabel().then { + $0.font = UIFont.systemFont(ofSize: 18, weight: .semibold) + $0.textAlignment = .center + $0.backgroundColor = .gray + } + + // MARK: - Lifecycle + + override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = .white + setUI() + setLayout() + startSkeleton() + loadImage() + } + + // MARK: - Setup Methods + + private func setUI() { + view.addSubviews(gonyaniImageView, loadingLabel) + } + + private func setLayout() { + gonyaniImageView.snp.makeConstraints { + $0.centerX.equalToSuperview() + $0.centerY.equalToSuperview() + $0.size.equalTo(200) + } + + loadingLabel.snp.makeConstraints { + $0.top.equalTo(gonyaniImageView.snp.bottom).offset(15) + $0.centerX.equalToSuperview() + $0.width.equalTo(200) + $0.height.equalTo(22) + } + } + + // MARK: - Private Methods + + private func startSkeleton() { + isSkeletonActive = true + + gonyaniImageView.image = nil + loadingLabel.text = nil + + skeletonAnimate() + } + + private func skeletonAnimate() { + guard isSkeletonActive else { return } + + UIView.animateKeyframes( + withDuration: 1.2, + delay: 0, + options: [.calculationModeLinear] + ) { + UIView.addKeyframe(withRelativeStartTime: 0, relativeDuration: 0.5) { + self.gonyaniImageView.alpha = 0.4 + self.loadingLabel.alpha = 0.4 + } + + UIView.addKeyframe(withRelativeStartTime: 0.5, relativeDuration: 0.5) { + self.gonyaniImageView.alpha = 1 + self.loadingLabel.alpha = 1 + } + } completion: { _ in + self.skeletonAnimate() + } + } + + private func stopSkeleton() { + isSkeletonActive = false + + gonyaniImageView.layer.removeAllAnimations() + loadingLabel.layer.removeAllAnimations() + } + + private func loadImage() { + DispatchQueue.main.asyncAfter(deadline: .now() + 2) { + self.stopSkeleton() + + self.gonyaniImageView.backgroundColor = .clear + self.loadingLabel.backgroundColor = .clear + + self.gonyaniImageView.image = .imgGonyani3 + self.loadingLabel.text = "Loading ..." + self.loadingLabel.textColor = .label + } + } +}