diff --git a/.gitignore b/.gitignore index 52fe2f7..d0e5692 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,48 @@ +# Created by https://www.toptal.com/developers/gitignore/api/macos,swift,xcode,cocoapods,swiftpackagemanager +# Edit at https://www.toptal.com/developers/gitignore?templates=macos,swift,xcode,cocoapods,swiftpackagemanager + +### CocoaPods ### +## CocoaPods GitIgnore Template + +# CocoaPods - Only use to conserve bandwidth / Save time on Pushing +# - Also handy if you have a large number of dependant pods +# - AS PER https://guides.cocoapods.org/using/using-cocoapods.html NEVER IGNORE THE LOCK FILE +Pods/ + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### macOS Patch ### +# iCloud generated files +*.icloud + +### Swift ### # Xcode # # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore @@ -5,6 +50,23 @@ ## User settings xcuserdata/ +## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) +*.xcscmblueprint +*.xccheckout + +## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) +build/ +DerivedData/ +*.moved-aside +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 + ## Obj-C/Swift specific *.hmap @@ -18,13 +80,11 @@ timeline.xctimeline playground.xcworkspace # Swift Package Manager -# # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. # Packages/ # Package.pins # Package.resolved # *.xcodeproj -# # Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata # hence it is not needed unless you have added a package configuration file to your project # .swiftpm @@ -32,25 +92,24 @@ playground.xcworkspace .build/ # CocoaPods -# # We recommend against adding the Pods directory to your .gitignore. However # you should judge for yourself, the pros and cons are mentioned at: # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control -# # Pods/ -# # Add this line if you want to avoid checking in source code from the Xcode workspace # *.xcworkspace # Carthage -# # Add this line if you want to avoid checking in source code from Carthage dependencies. # Carthage/Checkouts Carthage/Build/ +# Accio dependency management +Dependencies/ +.accio/ + # fastlane -# # It is recommended to not store the screenshots in the git repo. # Instead, use fastlane to re-generate the screenshots whenever they are needed. # For more information about the recommended setup visit: @@ -60,3 +119,30 @@ fastlane/report.xml fastlane/Preview.html fastlane/screenshots/**/*.png fastlane/test_output + +# Code Injection +# After new code Injection tools there's a generated folder /iOSInjectionProject +# https://github.com/johnno1962/injectionforxcode + +iOSInjectionProject/ + +### SwiftPackageManager ### +Packages +xcuserdata +*.xcodeproj + + +### Xcode ### + +## Xcode 8 and earlier + +### Xcode Patch ### +*.xcodeproj/* +!*.xcodeproj/project.pbxproj +!*.xcodeproj/xcshareddata/ +!*.xcodeproj/project.xcworkspace/ +!*.xcworkspace/contents.xcworkspacedata +/*.gcno +**/xcshareddata/WorkspaceSettings.xcsettings + +# End of https://www.toptal.com/developers/gitignore/api/macos,swift,xcode,cocoapods,swiftpackagemanager diff --git a/Baemin/Baemin.xcodeproj/project.pbxproj b/Baemin/Baemin.xcodeproj/project.pbxproj new file mode 100644 index 0000000..7ca8084 --- /dev/null +++ b/Baemin/Baemin.xcodeproj/project.pbxproj @@ -0,0 +1,394 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 77; + objects = { + +/* Begin PBXBuildFile section */ + B02922822EAD57720085E186 /* SnapKit in Frameworks */ = {isa = PBXBuildFile; productRef = B02922812EAD57720085E186 /* SnapKit */; }; + B02922852EAD577B0085E186 /* Then in Frameworks */ = {isa = PBXBuildFile; productRef = B02922842EAD577B0085E186 /* Then */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + B02922522EAD430F0085E186 /* Baemin.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Baemin.app; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */ + B02922642EAD43120085E186 /* Exceptions for "Baemin" folder in "Baemin" target */ = { + isa = PBXFileSystemSynchronizedBuildFileExceptionSet; + membershipExceptions = ( + Info.plist, + ); + target = B02922512EAD430F0085E186 /* Baemin */; + }; +/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */ + +/* Begin PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet section */ + B01C585D2EB4793600A1C49C /* Exceptions for "Baemin" folder in "Copy Bundle Resources" phase from "Baemin" target */ = { + isa = PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet; + buildPhase = B02922502EAD430F0085E186 /* Resources */; + membershipExceptions = ( + "Presentation/Common/Extensions/UIStackView+.swift", + ); + }; +/* End PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet section */ + +/* Begin PBXFileSystemSynchronizedRootGroup section */ + B02922542EAD430F0085E186 /* Baemin */ = { + isa = PBXFileSystemSynchronizedRootGroup; + exceptions = ( + B02922642EAD43120085E186 /* Exceptions for "Baemin" folder in "Baemin" target */, + B01C585D2EB4793600A1C49C /* Exceptions for "Baemin" folder in "Copy Bundle Resources" phase from "Baemin" target */, + ); + path = Baemin; + sourceTree = ""; + }; +/* End PBXFileSystemSynchronizedRootGroup section */ + +/* Begin PBXFrameworksBuildPhase section */ + B029224F2EAD430F0085E186 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + B02922822EAD57720085E186 /* SnapKit in Frameworks */, + B02922852EAD577B0085E186 /* Then in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + B02922492EAD430F0085E186 = { + isa = PBXGroup; + children = ( + B02922542EAD430F0085E186 /* Baemin */, + B02922532EAD430F0085E186 /* Products */, + ); + sourceTree = ""; + }; + B02922532EAD430F0085E186 /* Products */ = { + isa = PBXGroup; + children = ( + B02922522EAD430F0085E186 /* Baemin.app */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + B02922512EAD430F0085E186 /* Baemin */ = { + isa = PBXNativeTarget; + buildConfigurationList = B02922652EAD43120085E186 /* Build configuration list for PBXNativeTarget "Baemin" */; + buildPhases = ( + B029224E2EAD430F0085E186 /* Sources */, + B029224F2EAD430F0085E186 /* Frameworks */, + B02922502EAD430F0085E186 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + fileSystemSynchronizedGroups = ( + B02922542EAD430F0085E186 /* Baemin */, + ); + name = Baemin; + packageProductDependencies = ( + B02922812EAD57720085E186 /* SnapKit */, + B02922842EAD577B0085E186 /* Then */, + ); + productName = Baemin; + productReference = B02922522EAD430F0085E186 /* Baemin.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + B029224A2EAD430F0085E186 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1640; + LastUpgradeCheck = 1640; + TargetAttributes = { + B02922512EAD430F0085E186 = { + CreatedOnToolsVersion = 16.4; + }; + }; + }; + buildConfigurationList = B029224D2EAD430F0085E186 /* Build configuration list for PBXProject "Baemin" */; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = B02922492EAD430F0085E186; + minimizedProjectReferenceProxies = 1; + packageReferences = ( + B02922802EAD57720085E186 /* XCRemoteSwiftPackageReference "SnapKit" */, + B02922832EAD577B0085E186 /* XCRemoteSwiftPackageReference "Then" */, + ); + preferredProjectObjectVersion = 77; + productRefGroup = B02922532EAD430F0085E186 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + B02922512EAD430F0085E186 /* Baemin */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + B02922502EAD430F0085E186 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + B029224E2EAD430F0085E186 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + B02922662EAD43120085E186 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Baemin/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 = com.soeun.Baemin; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + B02922672EAD43120085E186 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Baemin/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 = com.soeun.Baemin; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + B02922682EAD43120085E186 /* 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; + 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; + INFOPLIST_FILE = ""; + 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; + }; + B02922692EAD43120085E186 /* 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"; + 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; + INFOPLIST_FILE = ""; + 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 */ + B029224D2EAD430F0085E186 /* Build configuration list for PBXProject "Baemin" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B02922682EAD43120085E186 /* Debug */, + B02922692EAD43120085E186 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B02922652EAD43120085E186 /* Build configuration list for PBXNativeTarget "Baemin" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B02922662EAD43120085E186 /* Debug */, + B02922672EAD43120085E186 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + B02922802EAD57720085E186 /* XCRemoteSwiftPackageReference "SnapKit" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/SnapKit/SnapKit.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 5.7.1; + }; + }; + B02922832EAD577B0085E186 /* XCRemoteSwiftPackageReference "Then" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/devxoul/Then.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 3.0.0; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + B02922812EAD57720085E186 /* SnapKit */ = { + isa = XCSwiftPackageProductDependency; + package = B02922802EAD57720085E186 /* XCRemoteSwiftPackageReference "SnapKit" */; + productName = SnapKit; + }; + B02922842EAD577B0085E186 /* Then */ = { + isa = XCSwiftPackageProductDependency; + package = B02922832EAD577B0085E186 /* XCRemoteSwiftPackageReference "Then" */; + productName = Then; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = B029224A2EAD430F0085E186 /* Project object */; +} diff --git a/Baemin/Baemin.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Baemin/Baemin.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/Baemin/Baemin.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Baemin/Baemin.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Baemin/Baemin.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 0000000..1566188 --- /dev/null +++ b/Baemin/Baemin.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,24 @@ +{ + "originHash" : "0cd11a4ea344b95c25e88fb39b351003de5b41040e76927e86f0f8b8a4edc7a3", + "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.git", + "state" : { + "revision" : "d41ef523faef0f911369f79c0b96815d9dbb6d7a", + "version" : "3.0.0" + } + } + ], + "version" : 3 +} diff --git a/Baemin/Baemin.xcodeproj/xcshareddata/xcschemes/Baemin.xcscheme b/Baemin/Baemin.xcodeproj/xcshareddata/xcschemes/Baemin.xcscheme new file mode 100644 index 0000000..3d2b7c5 --- /dev/null +++ b/Baemin/Baemin.xcodeproj/xcshareddata/xcschemes/Baemin.xcscheme @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Baemin/Baemin/App/AppDelegate.swift b/Baemin/Baemin/App/AppDelegate.swift new file mode 100644 index 0000000..6c14c44 --- /dev/null +++ b/Baemin/Baemin/App/AppDelegate.swift @@ -0,0 +1,36 @@ +// +// AppDelegate.swift +// Baemin +// +// Created by 진소은 on 10/26/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/Baemin/Baemin/App/SceneDelegate.swift b/Baemin/Baemin/App/SceneDelegate.swift new file mode 100644 index 0000000..65abab9 --- /dev/null +++ b/Baemin/Baemin/App/SceneDelegate.swift @@ -0,0 +1,58 @@ +// +// SceneDelegate.swift +// Baemin +// +// Created by 진소은 on 10/26/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: LoginViewController()) + + vc.setNavigationBarHidden(true, animated: false) + + 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/Baemin/Baemin/Info.plist b/Baemin/Baemin/Info.plist new file mode 100644 index 0000000..54a3c5e --- /dev/null +++ b/Baemin/Baemin/Info.plist @@ -0,0 +1,35 @@ + + + + + UIAppFonts + + Pretendard-Black.otf + Pretendard-Bold.otf + Pretendard-ExtraBold.otf + Pretendard-ExtraLight.otf + Pretendard-Light.otf + Pretendard-Medium.otf + Pretendard-Regular.otf + Pretendard-SemiBold.otf + Pretendard-Thin.otf + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + + + + + + diff --git a/Baemin/Baemin/Presentation/Common/Components/CTAButton.swift b/Baemin/Baemin/Presentation/Common/Components/CTAButton.swift new file mode 100644 index 0000000..8f55755 --- /dev/null +++ b/Baemin/Baemin/Presentation/Common/Components/CTAButton.swift @@ -0,0 +1,58 @@ +// +// CTAButton.swift +// Baemin +// +// Created by 진소은 on 10/26/25. +// + +import Foundation +import UIKit + +enum CTAButtonStyle { + case active + case inactive +} + +final class CTAButton: UIButton { + + // MARK: - Properties + + private var style: CTAButtonStyle = .inactive + + // MARK: - Life Cycle + + init() { + super.init(frame: .zero) + setUI() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + // MARK: - Override + + override var isEnabled: Bool { + willSet { + backgroundColor = newValue ? .baeminMint500 : .baeminGray200 + } + } + + private func setUI() { + titleLabel?.font = .pretendard(.head_b_18) + layer.cornerRadius = 4 + clipsToBounds = true + } + + // MARK: - Public Methods + + public func configure(style: CTAButtonStyle, title: String) { + self.style = style + setTitle(title, for: .normal) + if style == .active { + isEnabled = true + } else { + isEnabled = false + } + } +} diff --git a/Baemin/Baemin/Presentation/Common/Components/CustomNavigationBar.swift b/Baemin/Baemin/Presentation/Common/Components/CustomNavigationBar.swift new file mode 100644 index 0000000..a522b14 --- /dev/null +++ b/Baemin/Baemin/Presentation/Common/Components/CustomNavigationBar.swift @@ -0,0 +1,75 @@ +// +// CustomNavigationBar.swift +// Baemin +// +// Created by 진소은 on 10/29/25. +// + +import UIKit + +import SnapKit +import Then + +final class CustomNavigationBar: UIView { + + // MARK: - Properties + + var onBackButtonTapped: (() -> Void)? + + // MARK: - UI Components + + private lazy var backButton = UIButton() + private let titleLabel = UILabel() + + // MARK: - Init + + init(title: String) { + super.init(frame: .zero) + titleLabel.text = title + + setUI() + setLayout() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + // MARK: - Set UI + + private func setUI() { + addSubviews(backButton,titleLabel) + + backButton.do { + $0.setImage(.icArrowLeft, for: .normal) + $0.addTarget(self, action: #selector(backButtonDidTap), for: .touchUpInside) + } + + titleLabel.do { + $0.textColor = .baeminBlack + $0.font = .pretendard(.title_sb_18) + $0.textAlignment = .center + } + } + + // MARK: - Set Layout + + private func setLayout() { + backButton.snp.makeConstraints { + $0.leading.equalToSuperview().inset(8) + $0.centerY.equalToSuperview() + $0.size.equalTo(36) + } + + titleLabel.snp.makeConstraints { + $0.center.equalToSuperview() + } + } + + // MARK: - Action + + @objc + private func backButtonDidTap() { + onBackButtonTapped?() + } +} diff --git a/Baemin/Baemin/Presentation/Common/Extensions/UIFont+.swift b/Baemin/Baemin/Presentation/Common/Extensions/UIFont+.swift new file mode 100644 index 0000000..8e502af --- /dev/null +++ b/Baemin/Baemin/Presentation/Common/Extensions/UIFont+.swift @@ -0,0 +1,42 @@ +// +// UIFont+.swift +// Baemin +// +// Created by 진소은 on 10/26/25. +// + +import UIKit + +extension UIFont { + + enum Family: String, CaseIterable { + case Black, Bold, ExtraBold, ExtraLight, Light, Medium, Regular, Semibold, Thin + } + + enum SuitStyle { + case head_b_24 + case head_b_18 + case title_sb_18 + case body_r_14 + case caption_r_10 + } + + static func pretendard(weight: Family = .Regular, size: CGFloat) -> UIFont { + if let font = UIFont(name: "Pretendard-\(weight.rawValue)", size: size) { + return font + } else { + print("Pretendard-\(weight.rawValue) loading failed, fallback to system font") + return .systemFont(ofSize: size) + } + } + + static func pretendard(_ style: SuitStyle) -> UIFont { + switch style { + case .head_b_24: return .pretendard(weight: .Bold, size: 24) + case .head_b_18: return .pretendard(weight: .Bold, size: 18) + case .title_sb_18: return .pretendard(weight: .Semibold, size: 18) + case .body_r_14: return .pretendard(weight: .Regular, size: 14) + case .caption_r_10: return .pretendard(weight: .Regular, size: 10) + } + } +} diff --git a/Baemin/Baemin/Presentation/Common/Extensions/UIStackView+.swift b/Baemin/Baemin/Presentation/Common/Extensions/UIStackView+.swift new file mode 100644 index 0000000..6ce6fa4 --- /dev/null +++ b/Baemin/Baemin/Presentation/Common/Extensions/UIStackView+.swift @@ -0,0 +1,14 @@ +// +// UIStackView+.swift +// Baemin +// +// Created by 진소은 on 10/31/25. +// + +import UIKit + +extension UIStackView { + func addArrangedSubviews(_ views: UIView...) { + views.forEach { self.addArrangedSubview($0) } + } +} diff --git a/Baemin/Baemin/Presentation/Common/Extensions/UITextField+.swift b/Baemin/Baemin/Presentation/Common/Extensions/UITextField+.swift new file mode 100644 index 0000000..13aae12 --- /dev/null +++ b/Baemin/Baemin/Presentation/Common/Extensions/UITextField+.swift @@ -0,0 +1,35 @@ +// +// UITextField+.swift +// Baemin +// +// Created by 진소은 on 10/28/25. +// + +import UIKit + +extension UITextField { + + func setPlaceholder(color: UIColor) { + guard let string = self.placeholder else { + return + } + attributedPlaceholder = NSAttributedString(string: string, attributes: [.foregroundColor: color]) + } + + func addPadding(_ width: CGFloat = 10) { + addLeftPadding(width) + addRightPadding(width) + } + + func addLeftPadding(_ width: CGFloat = 10) { + let paddingView = UIView(frame: CGRect(x: 0, y: 0, width: width, height: self.frame.height)) + self.leftView = paddingView + self.leftViewMode = ViewMode.always + } + + func addRightPadding(_ width: CGFloat = 10) { + let paddingView = UIView(frame: CGRect(x: 0, y: 0, width: width, height: self.frame.height)) + self.rightView = paddingView + self.rightViewMode = ViewMode.always + } +} diff --git a/Baemin/Baemin/Presentation/Common/Extensions/UIView+.swift b/Baemin/Baemin/Presentation/Common/Extensions/UIView+.swift new file mode 100644 index 0000000..4cd05d8 --- /dev/null +++ b/Baemin/Baemin/Presentation/Common/Extensions/UIView+.swift @@ -0,0 +1,14 @@ +// +// UIView+.swift +// Baemin +// +// Created by 진소은 on 10/26/25. +// + +import UIKit + +extension UIView { + func addSubviews(_ views: UIView...) { + views.forEach { self.addSubview($0) } + } +} diff --git a/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/AccentColor.colorset/Contents.json b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..2305880 --- /dev/null +++ b/Baemin/Baemin/Presentation/Common/Resources/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/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Colors/Contents.json b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Colors/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Colors/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Colors/baemin_black.colorset/Contents.json b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Colors/baemin_black.colorset/Contents.json new file mode 100644 index 0000000..a947249 --- /dev/null +++ b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Colors/baemin_black.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "26", + "green" : "26", + "red" : "24" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "255", + "green" : "255", + "red" : "255" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Colors/baemin_gray_200.colorset/Contents.json b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Colors/baemin_gray_200.colorset/Contents.json new file mode 100644 index 0000000..864ddca --- /dev/null +++ b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Colors/baemin_gray_200.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "217", + "green" : "211", + "red" : "209" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "255", + "green" : "255", + "red" : "255" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Colors/baemin_gray_300.colorset/Contents.json b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Colors/baemin_gray_300.colorset/Contents.json new file mode 100644 index 0000000..e49884e --- /dev/null +++ b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Colors/baemin_gray_300.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "181", + "green" : "179", + "red" : "177" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "255", + "green" : "255", + "red" : "255" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Colors/baemin_gray_700.colorset/Contents.json b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Colors/baemin_gray_700.colorset/Contents.json new file mode 100644 index 0000000..b9b543b --- /dev/null +++ b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Colors/baemin_gray_700.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "102", + "green" : "102", + "red" : "102" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "255", + "green" : "255", + "red" : "255" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Colors/baemin_mint_300.colorset/Contents.json b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Colors/baemin_mint_300.colorset/Contents.json new file mode 100644 index 0000000..978e069 --- /dev/null +++ b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Colors/baemin_mint_300.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "219", + "green" : "227", + "red" : "127" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "255", + "green" : "255", + "red" : "255" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Colors/baemin_mint_500.colorset/Contents.json b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Colors/baemin_mint_500.colorset/Contents.json new file mode 100644 index 0000000..8b5742b --- /dev/null +++ b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Colors/baemin_mint_500.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "179", + "green" : "184", + "red" : "40" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "255", + "green" : "255", + "red" : "255" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Colors/baemin_white.colorset/Contents.json b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Colors/baemin_white.colorset/Contents.json new file mode 100644 index 0000000..c60cea5 --- /dev/null +++ b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Colors/baemin_white.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "255", + "green" : "255", + "red" : "255" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "255", + "green" : "255", + "red" : "255" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Contents.json b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/Contents.json b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/ic_arrow_left.imageset/Contents.json b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/ic_arrow_left.imageset/Contents.json new file mode 100644 index 0000000..1448d9b --- /dev/null +++ b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/ic_arrow_left.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "ic_arrow_left.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/ic_arrow_left.imageset/ic_arrow_left.svg b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/ic_arrow_left.imageset/ic_arrow_left.svg new file mode 100644 index 0000000..d1b8402 --- /dev/null +++ b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/ic_arrow_left.imageset/ic_arrow_left.svg @@ -0,0 +1,3 @@ + + + diff --git a/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/ic_back.imageset/Contents.json b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/ic_back.imageset/Contents.json new file mode 100644 index 0000000..5b4693b --- /dev/null +++ b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/ic_back.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "ic_back.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/ic_back.imageset/ic_back.svg b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/ic_back.imageset/ic_back.svg new file mode 100644 index 0000000..f3d9d35 --- /dev/null +++ b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/ic_back.imageset/ic_back.svg @@ -0,0 +1,3 @@ + + + diff --git a/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/ic_chevron_right.imageset/Contents.json b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/ic_chevron_right.imageset/Contents.json new file mode 100644 index 0000000..6b49173 --- /dev/null +++ b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/ic_chevron_right.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "ic_chevron_right.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/ic_chevron_right.imageset/ic_chevron_right.svg b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/ic_chevron_right.imageset/ic_chevron_right.svg new file mode 100644 index 0000000..4d59870 --- /dev/null +++ b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/ic_chevron_right.imageset/ic_chevron_right.svg @@ -0,0 +1,3 @@ + + + diff --git a/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/ic_clear.imageset/Contents.json b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/ic_clear.imageset/Contents.json new file mode 100644 index 0000000..387d4c9 --- /dev/null +++ b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/ic_clear.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "ic_clear.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/ic_clear.imageset/ic_clear.svg b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/ic_clear.imageset/ic_clear.svg new file mode 100644 index 0000000..a416cb0 --- /dev/null +++ b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/ic_clear.imageset/ic_clear.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/ic_eye_hide.imageset/Contents.json b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/ic_eye_hide.imageset/Contents.json new file mode 100644 index 0000000..4b29446 --- /dev/null +++ b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/ic_eye_hide.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "ic_eye_hide.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/ic_eye_hide.imageset/ic_eye_hide.svg b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/ic_eye_hide.imageset/ic_eye_hide.svg new file mode 100644 index 0000000..76e0742 --- /dev/null +++ b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/ic_eye_hide.imageset/ic_eye_hide.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/ic_eye_open.imageset/Contents.json b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/ic_eye_open.imageset/Contents.json new file mode 100644 index 0000000..a3edb9c --- /dev/null +++ b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/ic_eye_open.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "ic_eye_open.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/ic_eye_open.imageset/ic_eye_open.svg b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/ic_eye_open.imageset/ic_eye_open.svg new file mode 100644 index 0000000..e9e7195 --- /dev/null +++ b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Icon/ic_eye_open.imageset/ic_eye_open.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Image/Contents.json b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Image/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Image/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Image/img_welcome.imageset/Contents.json b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Image/img_welcome.imageset/Contents.json new file mode 100644 index 0000000..e25b4cb --- /dev/null +++ b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Image/img_welcome.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "img_welcome.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Image/img_welcome.imageset/img_welcome.svg b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Image/img_welcome.imageset/img_welcome.svg new file mode 100644 index 0000000..f3ac53a --- /dev/null +++ b/Baemin/Baemin/Presentation/Common/Resources/Assets.xcassets/Image/img_welcome.imageset/img_welcome.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/Baemin/Baemin/Presentation/Common/Resources/Fonts/Pretendard-Black.otf b/Baemin/Baemin/Presentation/Common/Resources/Fonts/Pretendard-Black.otf new file mode 100644 index 0000000..a0d849e Binary files /dev/null and b/Baemin/Baemin/Presentation/Common/Resources/Fonts/Pretendard-Black.otf differ diff --git a/Baemin/Baemin/Presentation/Common/Resources/Fonts/Pretendard-Bold.otf b/Baemin/Baemin/Presentation/Common/Resources/Fonts/Pretendard-Bold.otf new file mode 100644 index 0000000..8e5e30a Binary files /dev/null and b/Baemin/Baemin/Presentation/Common/Resources/Fonts/Pretendard-Bold.otf differ diff --git a/Baemin/Baemin/Presentation/Common/Resources/Fonts/Pretendard-ExtraBold.otf b/Baemin/Baemin/Presentation/Common/Resources/Fonts/Pretendard-ExtraBold.otf new file mode 100644 index 0000000..388f3ca Binary files /dev/null and b/Baemin/Baemin/Presentation/Common/Resources/Fonts/Pretendard-ExtraBold.otf differ diff --git a/Baemin/Baemin/Presentation/Common/Resources/Fonts/Pretendard-ExtraLight.otf b/Baemin/Baemin/Presentation/Common/Resources/Fonts/Pretendard-ExtraLight.otf new file mode 100644 index 0000000..40c8b69 Binary files /dev/null and b/Baemin/Baemin/Presentation/Common/Resources/Fonts/Pretendard-ExtraLight.otf differ diff --git a/Baemin/Baemin/Presentation/Common/Resources/Fonts/Pretendard-Light.otf b/Baemin/Baemin/Presentation/Common/Resources/Fonts/Pretendard-Light.otf new file mode 100644 index 0000000..228679e Binary files /dev/null and b/Baemin/Baemin/Presentation/Common/Resources/Fonts/Pretendard-Light.otf differ diff --git a/Baemin/Baemin/Presentation/Common/Resources/Fonts/Pretendard-Medium.otf b/Baemin/Baemin/Presentation/Common/Resources/Fonts/Pretendard-Medium.otf new file mode 100644 index 0000000..0575069 Binary files /dev/null and b/Baemin/Baemin/Presentation/Common/Resources/Fonts/Pretendard-Medium.otf differ diff --git a/Baemin/Baemin/Presentation/Common/Resources/Fonts/Pretendard-Regular.otf b/Baemin/Baemin/Presentation/Common/Resources/Fonts/Pretendard-Regular.otf new file mode 100644 index 0000000..08bf4cf Binary files /dev/null and b/Baemin/Baemin/Presentation/Common/Resources/Fonts/Pretendard-Regular.otf differ diff --git a/Baemin/Baemin/Presentation/Common/Resources/Fonts/Pretendard-SemiBold.otf b/Baemin/Baemin/Presentation/Common/Resources/Fonts/Pretendard-SemiBold.otf new file mode 100644 index 0000000..e7e36ab Binary files /dev/null and b/Baemin/Baemin/Presentation/Common/Resources/Fonts/Pretendard-SemiBold.otf differ diff --git a/Baemin/Baemin/Presentation/Common/Resources/Fonts/Pretendard-Thin.otf b/Baemin/Baemin/Presentation/Common/Resources/Fonts/Pretendard-Thin.otf new file mode 100644 index 0000000..77e792d Binary files /dev/null and b/Baemin/Baemin/Presentation/Common/Resources/Fonts/Pretendard-Thin.otf differ diff --git a/Baemin/Baemin/Presentation/View/LoginViewController.swift b/Baemin/Baemin/Presentation/View/LoginViewController.swift new file mode 100644 index 0000000..7bb1053 --- /dev/null +++ b/Baemin/Baemin/Presentation/View/LoginViewController.swift @@ -0,0 +1,267 @@ +// +// LoginViewController.swift +// Baemin +// +// Created by 진소은 on 10/28/25. +// + +import UIKit + +import SnapKit +import Then + +class LoginViewController: UIViewController { + + // MARK: - UI Components + + private let navigationBar = CustomNavigationBar(title: "이메일 또는 아이디로 계속") + private let idTextField = UITextField() + private let passwordStackView = UIStackView() + private let passwordTextField = UITextField() + private let clearButton = UIButton() + private let secureButton = UIButton() + private let loginButton = CTAButton() + private let findAccountStackView = UIStackView() + private let findAccountLabel = UILabel() + private let detailButton = UIButton() + + // MARK: - Life Cycle + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + idTextField.text = "" + passwordTextField.text = "" + loginButton.isEnabled = false + } + + override func viewDidLoad() { + super.viewDidLoad() + + setUI() + setLayout() + setTextFieldActions() + } + + // MARK: - Set UI + + private func setUI() { + view.backgroundColor = .white + + idTextField.do { + $0.textColor = .baeminBlack + $0.font = .pretendard(.body_r_14) + $0.addPadding(10) + $0.placeholder = "이메일 아이디" + $0.setPlaceholder(color: .baeminGray700) + $0.borderStyle = .none + $0.layer.borderWidth = 1 + $0.layer.borderColor = UIColor(.baeminGray200).cgColor + $0.layer.cornerRadius = 4 + } + + passwordStackView.do { + $0.axis = .horizontal + $0.spacing = 16 + $0.alignment = .center + } + + passwordTextField.do { + $0.textColor = .baeminBlack + $0.font = .pretendard(.body_r_14) + $0.addPadding(10) + $0.placeholder = "비밀번호" + $0.setPlaceholder(color: .baeminGray700) + $0.borderStyle = .none + $0.layer.borderWidth = 1 + $0.layer.borderColor = UIColor(.baeminGray200).cgColor + $0.layer.cornerRadius = 4 + $0.isSecureTextEntry = true + } + + clearButton.do { + $0.setImage(.icClear, for: .normal) + $0.isHidden = true + $0.addTarget(self, action: #selector(clearButtonDidTapped), for: .touchUpInside) + } + + secureButton.do { + $0.setImage(.icEyeHide, for: .normal) + $0.isHidden = true + $0.addTarget(self, action: #selector(secureButtonDidTapped), for: .touchUpInside) + } + + loginButton.configure(style: .inactive, title: "로그인") + loginButton.do { + $0.addTarget(self, action: #selector(loginButtonDidTapped), for: .touchUpInside) + } + + findAccountLabel.do { + $0.text = "계정 찾기" + $0.font = .pretendard(.body_r_14) + $0.textColor = .baeminBlack + } + + detailButton.do { + $0.setImage(.icChevronRight, for: .normal) + } + + findAccountStackView.do { + $0.axis = .horizontal + $0.spacing = 4 + $0.alignment = .center + } + } + + // MARK: - Set Layout + + private func setLayout() { + view.addSubviews(navigationBar, idTextField, passwordTextField, passwordStackView, loginButton, findAccountStackView) + passwordStackView.addArrangedSubviews(clearButton, secureButton) + findAccountStackView.addArrangedSubviews(findAccountLabel, detailButton) + + navigationBar.snp.makeConstraints { + $0.top.equalTo(view.safeAreaLayoutGuide) + $0.horizontalEdges.equalToSuperview() + $0.height.equalTo(42) + } + + idTextField.snp.makeConstraints { + $0.top.equalTo(view.safeAreaLayoutGuide).inset(66) + $0.height.equalTo(46) + $0.horizontalEdges.equalToSuperview().inset(16) + } + + passwordTextField.snp.makeConstraints { + $0.top.equalTo(idTextField.snp.bottom).offset(12) + $0.height.equalTo(46) + $0.horizontalEdges.equalToSuperview().inset(16) + } + + passwordStackView.snp.makeConstraints { + $0.trailing.equalTo(passwordTextField.snp.trailing).inset(20) + $0.centerY.equalTo(passwordTextField) + } + + loginButton.snp.makeConstraints { + $0.top.equalTo(passwordTextField.snp.bottom).offset(20) + $0.height.equalTo(46) + $0.horizontalEdges.equalToSuperview().inset(16) + } + + findAccountStackView.snp.makeConstraints { + $0.top.equalTo(loginButton.snp.bottom).offset(32) + $0.centerX.equalToSuperview() + } + } + + // MARK: - Override + + override func touchesBegan(_ touches: Set, with event: UIEvent?) { + super.touchesBegan(touches, with: event) + view.endEditing(true) + } + + // MARK: - Private Methods + + private func setTextFieldActions() { + [idTextField, passwordTextField].forEach { + $0.addTarget(self, action: #selector(textFieldDidChange), for: .editingChanged) + $0.addTarget(self, action: #selector(textFieldEditingDidBegin), for: .editingDidBegin) + $0.addTarget(self, action: #selector(textFieldEditingDidEnd), for: .editingDidEnd) + } + } + + private func pushToWelcomeVC() { + let welcomeVC = WelcomeViewController() + welcomeVC.setName(name: idTextField.text) + self.navigationController?.pushViewController(welcomeVC, animated: true) + } + + // MARK: - Actions + + @objc + func clearButtonDidTapped() { + passwordTextField.text = "" + loginButton.isEnabled = false + } + + @objc + func secureButtonDidTapped() { + if passwordTextField.isSecureTextEntry { + passwordTextField.isSecureTextEntry = false + secureButton.setImage(.icEyeOpen, for: .normal) + } else { + passwordTextField.isSecureTextEntry = true + secureButton.setImage(.icEyeHide, for: .normal) + } + } + + @objc + func loginButtonDidTapped() { + if idTextField.text?.isValidEmail == false { + let alertController = UIAlertController( + title: "알림", + message: "이메일 형식을 확인하세요", + preferredStyle: .alert + ) + let ok = UIAlertAction(title: "확인", style: .cancel) + alertController.addAction(ok) + present(alertController, animated: true) + } else if passwordTextField.text?.isValidPassword == false { + let alertController = UIAlertController( + title: "알림", + message: "비밀번호 형식을 확인하세요\n8~16자 영문, 숫자, 특수문자 조합", + preferredStyle: .alert + ) + let ok = UIAlertAction(title: "확인", style: .cancel) + alertController.addAction(ok) + present(alertController, animated: true) + } else { + pushToWelcomeVC() + view.endEditing(true) + } + } + + @objc + func textFieldDidChange(_ textField: UITextField) { + let idText = idTextField.text ?? "" + let pwText = passwordTextField.text ?? "" + loginButton.isEnabled = !idText.isEmpty && !pwText.isEmpty + } + + @objc + func textFieldEditingDidBegin(_ textField: UITextField) { + textField.layer.borderColor = UIColor.baeminBlack.cgColor + if (textField == passwordTextField) { + clearButton.isHidden = false + secureButton.isHidden = false + } + } + + @objc + func textFieldEditingDidEnd(_ textField: UITextField) { + textField.layer.borderColor = UIColor.baeminGray200.cgColor + if (textField == passwordTextField) { + clearButton.isHidden = true + secureButton.isHidden = true + } + } +} + +extension String { + var isValidEmail: Bool { + let regularExpression = "^[A-Z0-9a-z._%+-]+@([A-Za-z0-9-]+\\.)+[A-Za-z]{2,}$" + let predicate = NSPredicate(format: "SELF MATCHES %@", regularExpression) + return predicate.evaluate(with: self) + } + + var isValidPassword: Bool { + let regularExpression = "^(?=.*[A-Za-z])(?=.*[0-9])(?=.*[!@#$%^&*()_+=-]).{8,16}" + let predicate = NSPredicate(format: "SELF MATCHES %@", regularExpression) + return predicate.evaluate(with: self) + } +} + +#Preview { + LoginViewController() +} diff --git a/Baemin/Baemin/Presentation/View/WelcomeViewController.swift b/Baemin/Baemin/Presentation/View/WelcomeViewController.swift new file mode 100644 index 0000000..033e69c --- /dev/null +++ b/Baemin/Baemin/Presentation/View/WelcomeViewController.swift @@ -0,0 +1,124 @@ +// +// WelcomeViewController.swift +// Baemin +// +// Created by 진소은 on 10/31/25. +// + +import UIKit + +import SnapKit +import Then + +final class WelcomeViewController: UIViewController { + + // MARK: - Properties + + var name: String? + + // MARK: - UI Components + + private let navigationBar = CustomNavigationBar(title: "화녕해요") + private let welcomeImageView = UIImageView() + private let welcomeLabel = UILabel() + private let userLabel = UILabel() + private lazy var backButton = CTAButton() + + // MARK: - Life Cycle + + override func viewDidLoad() { + super.viewDidLoad() + + setUI() + setLayout() + } + + // MARK: - Set UI + + private func setUI() { + view.backgroundColor = .white + + navigationBar.onBackButtonTapped = { [weak self] in + self?.navigationController?.popViewController(animated: true) + } + + welcomeImageView.do { + $0.image = UIImage(named: "img_welcome") + } + + welcomeLabel.do { + $0.text = "환영합니다" + $0.font = .pretendard(.head_b_24) + $0.textColor = .baeminBlack + $0.textAlignment = .center + } + + userLabel.do { + $0.font = .pretendard(.title_sb_18) + $0.textColor = .baeminBlack + $0.textAlignment = .center + $0.numberOfLines = 0 + } + + backButton.configure(style: .active, title: "뒤로가기") + backButton.do { + $0.addTarget(self, action: #selector(backButtonDidTapped), for: .touchUpInside) + } + } + + // MARK: - Set Layout + + private func setLayout() { + view.addSubviews(navigationBar, welcomeImageView, welcomeLabel, userLabel, backButton) + + navigationBar.snp.makeConstraints { + $0.top.leading.trailing.equalTo(view.safeAreaLayoutGuide) + $0.height.equalTo(42) + } + + welcomeImageView.snp.makeConstraints { + $0.top.equalTo(navigationBar.snp.bottom).offset(6) + $0.horizontalEdges.equalToSuperview() + $0.height.equalTo(211) + } + + welcomeLabel.snp.makeConstraints { + $0.top.equalTo(welcomeImageView.snp.bottom).offset(24) + $0.centerX.equalToSuperview() + $0.height.equalTo(24) + } + + userLabel.snp.makeConstraints { + $0.top.equalTo(welcomeLabel.snp.bottom).offset(16) + $0.horizontalEdges.centerX.equalToSuperview() + } + + backButton.snp.makeConstraints { + $0.horizontalEdges.equalToSuperview().inset(16) + $0.bottom.equalToSuperview().inset(48) + $0.height.equalTo(52) + } + } + + // MARK: - Public Methods + + public func setName(name: String?) { + self.name = name + self.userLabel.text = "\(name ?? "nil")님 \n반가워요!" + } + + // MARK: - Actions + + @objc + func backButtonDidTapped() { + if self.navigationController == nil { + self.dismiss(animated: true) + } else { + self.navigationController?.popViewController(animated: true) + } + } +} + +#Preview { + WelcomeViewController() +}