diff --git a/Simulator Screen Recording - iPhone 14 Pro - 2023-12-09 at 11.35.59.mp4 b/Simulator Screen Recording - iPhone 14 Pro - 2023-12-09 at 11.35.59.mp4 new file mode 100644 index 0000000..da9411c Binary files /dev/null and b/Simulator Screen Recording - iPhone 14 Pro - 2023-12-09 at 11.35.59.mp4 differ diff --git a/SixthWorkbook/SixthWorkbook.xcodeproj/project.pbxproj b/SixthWorkbook/SixthWorkbook.xcodeproj/project.pbxproj new file mode 100644 index 0000000..4329f3c --- /dev/null +++ b/SixthWorkbook/SixthWorkbook.xcodeproj/project.pbxproj @@ -0,0 +1,425 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + 807F615B2B0ECE120081054D /* SixthWorkbookApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 807F615A2B0ECE120081054D /* SixthWorkbookApp.swift */; }; + 807F615D2B0ECE120081054D /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 807F615C2B0ECE120081054D /* ContentView.swift */; }; + 807F615F2B0ECE140081054D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 807F615E2B0ECE140081054D /* Assets.xcassets */; }; + 807F61622B0ECE140081054D /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 807F61612B0ECE140081054D /* Preview Assets.xcassets */; }; + 80E78B042B233A1F00628A9C /* TabButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80E78B032B233A1F00628A9C /* TabButtonView.swift */; }; + 80E78B062B2381D500628A9C /* UserDefaultKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80E78B052B2381D500628A9C /* UserDefaultKey.swift */; }; + 80E78B082B23821D00628A9C /* LogInView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80E78B072B23821D00628A9C /* LogInView.swift */; }; + 80E78B0A2B2384B300628A9C /* WeatherAPIView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80E78B092B2384B300628A9C /* WeatherAPIView.swift */; }; + 80E78B0E2B2385C600628A9C /* Moya in Frameworks */ = {isa = PBXBuildFile; productRef = 80E78B0D2B2385C600628A9C /* Moya */; }; + 80E78B102B2385DC00628A9C /* WeatherAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80E78B0F2B2385DC00628A9C /* WeatherAPI.swift */; }; + 80E78B122B23861600628A9C /* weather.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80E78B112B23861600628A9C /* weather.swift */; }; + 80E78B162B24016700628A9C /* SecondNextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80E78B152B24016700628A9C /* SecondNextView.swift */; }; + 80E78B182B2401B100628A9C /* ThirdNextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80E78B172B2401B100628A9C /* ThirdNextView.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 807F61572B0ECE120081054D /* SixthWorkbook.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SixthWorkbook.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 807F615A2B0ECE120081054D /* SixthWorkbookApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SixthWorkbookApp.swift; sourceTree = ""; }; + 807F615C2B0ECE120081054D /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + 807F615E2B0ECE140081054D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 807F61612B0ECE140081054D /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + 80E78B032B233A1F00628A9C /* TabButtonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabButtonView.swift; sourceTree = ""; }; + 80E78B052B2381D500628A9C /* UserDefaultKey.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserDefaultKey.swift; sourceTree = ""; }; + 80E78B072B23821D00628A9C /* LogInView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogInView.swift; sourceTree = ""; }; + 80E78B092B2384B300628A9C /* WeatherAPIView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WeatherAPIView.swift; sourceTree = ""; }; + 80E78B0F2B2385DC00628A9C /* WeatherAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WeatherAPI.swift; sourceTree = ""; }; + 80E78B112B23861600628A9C /* weather.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = weather.swift; sourceTree = ""; }; + 80E78B152B24016700628A9C /* SecondNextView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecondNextView.swift; sourceTree = ""; }; + 80E78B172B2401B100628A9C /* ThirdNextView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThirdNextView.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 807F61542B0ECE120081054D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 80E78B0E2B2385C600628A9C /* Moya in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 807F614E2B0ECE120081054D = { + isa = PBXGroup; + children = ( + 807F61592B0ECE120081054D /* SixthWorkbook */, + 807F61582B0ECE120081054D /* Products */, + ); + sourceTree = ""; + }; + 807F61582B0ECE120081054D /* Products */ = { + isa = PBXGroup; + children = ( + 807F61572B0ECE120081054D /* SixthWorkbook.app */, + ); + name = Products; + sourceTree = ""; + }; + 807F61592B0ECE120081054D /* SixthWorkbook */ = { + isa = PBXGroup; + children = ( + 80E78B142B24010800628A9C /* NavigationExercise_SwiftUI */, + 80E78B192B2403AF00628A9C /* LogInExercise_SwiftUI */, + 80E78B132B24003B00628A9C /* APIExercise_SwiftUI */, + 807F615A2B0ECE120081054D /* SixthWorkbookApp.swift */, + 807F615C2B0ECE120081054D /* ContentView.swift */, + 80E78B032B233A1F00628A9C /* TabButtonView.swift */, + 807F615E2B0ECE140081054D /* Assets.xcassets */, + 807F61602B0ECE140081054D /* Preview Content */, + ); + path = SixthWorkbook; + sourceTree = ""; + }; + 807F61602B0ECE140081054D /* Preview Content */ = { + isa = PBXGroup; + children = ( + 807F61612B0ECE140081054D /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; + 80E78B132B24003B00628A9C /* APIExercise_SwiftUI */ = { + isa = PBXGroup; + children = ( + 80E78B092B2384B300628A9C /* WeatherAPIView.swift */, + 80E78B112B23861600628A9C /* weather.swift */, + 80E78B0F2B2385DC00628A9C /* WeatherAPI.swift */, + ); + path = APIExercise_SwiftUI; + sourceTree = ""; + }; + 80E78B142B24010800628A9C /* NavigationExercise_SwiftUI */ = { + isa = PBXGroup; + children = ( + 80E78B152B24016700628A9C /* SecondNextView.swift */, + 80E78B172B2401B100628A9C /* ThirdNextView.swift */, + ); + path = NavigationExercise_SwiftUI; + sourceTree = ""; + }; + 80E78B192B2403AF00628A9C /* LogInExercise_SwiftUI */ = { + isa = PBXGroup; + children = ( + 80E78B052B2381D500628A9C /* UserDefaultKey.swift */, + 80E78B072B23821D00628A9C /* LogInView.swift */, + ); + path = LogInExercise_SwiftUI; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 807F61562B0ECE120081054D /* SixthWorkbook */ = { + isa = PBXNativeTarget; + buildConfigurationList = 807F61652B0ECE140081054D /* Build configuration list for PBXNativeTarget "SixthWorkbook" */; + buildPhases = ( + 807F61532B0ECE120081054D /* Sources */, + 807F61542B0ECE120081054D /* Frameworks */, + 807F61552B0ECE120081054D /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SixthWorkbook; + packageProductDependencies = ( + 80E78B0D2B2385C600628A9C /* Moya */, + ); + productName = SixthWorkbook; + productReference = 807F61572B0ECE120081054D /* SixthWorkbook.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 807F614F2B0ECE120081054D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1420; + LastUpgradeCheck = 1420; + TargetAttributes = { + 807F61562B0ECE120081054D = { + CreatedOnToolsVersion = 14.2; + }; + }; + }; + buildConfigurationList = 807F61522B0ECE120081054D /* Build configuration list for PBXProject "SixthWorkbook" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 807F614E2B0ECE120081054D; + packageReferences = ( + 80E78B0C2B2385C600628A9C /* XCRemoteSwiftPackageReference "Moya" */, + ); + productRefGroup = 807F61582B0ECE120081054D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 807F61562B0ECE120081054D /* SixthWorkbook */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 807F61552B0ECE120081054D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 807F61622B0ECE140081054D /* Preview Assets.xcassets in Resources */, + 807F615F2B0ECE140081054D /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 807F61532B0ECE120081054D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 80E78B122B23861600628A9C /* weather.swift in Sources */, + 80E78B182B2401B100628A9C /* ThirdNextView.swift in Sources */, + 80E78B162B24016700628A9C /* SecondNextView.swift in Sources */, + 807F615D2B0ECE120081054D /* ContentView.swift in Sources */, + 80E78B062B2381D500628A9C /* UserDefaultKey.swift in Sources */, + 807F615B2B0ECE120081054D /* SixthWorkbookApp.swift in Sources */, + 80E78B042B233A1F00628A9C /* TabButtonView.swift in Sources */, + 80E78B082B23821D00628A9C /* LogInView.swift in Sources */, + 80E78B102B2385DC00628A9C /* WeatherAPI.swift in Sources */, + 80E78B0A2B2384B300628A9C /* WeatherAPIView.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 807F61632B0ECE140081054D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + 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; + GCC_C_LANGUAGE_STANDARD = gnu11; + 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 = 16.2; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 807F61642B0ECE140081054D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + 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; + GCC_C_LANGUAGE_STANDARD = gnu11; + 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 = 16.2; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 807F61662B0ECE140081054D /* 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_ASSET_PATHS = "\"SixthWorkbook/Preview Content\""; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + 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 = soomin.SixthWorkbook; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 807F61672B0ECE140081054D /* 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_ASSET_PATHS = "\"SixthWorkbook/Preview Content\""; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + 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 = soomin.SixthWorkbook; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 807F61522B0ECE120081054D /* Build configuration list for PBXProject "SixthWorkbook" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 807F61632B0ECE140081054D /* Debug */, + 807F61642B0ECE140081054D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 807F61652B0ECE140081054D /* Build configuration list for PBXNativeTarget "SixthWorkbook" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 807F61662B0ECE140081054D /* Debug */, + 807F61672B0ECE140081054D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + 80E78B0C2B2385C600628A9C /* XCRemoteSwiftPackageReference "Moya" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/Moya/Moya.git"; + requirement = { + branch = master; + kind = branch; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 80E78B0D2B2385C600628A9C /* Moya */ = { + isa = XCSwiftPackageProductDependency; + package = 80E78B0C2B2385C600628A9C /* XCRemoteSwiftPackageReference "Moya" */; + productName = Moya; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = 807F614F2B0ECE120081054D /* Project object */; +} diff --git a/SixthWorkbook/SixthWorkbook.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/SixthWorkbook/SixthWorkbook.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/SixthWorkbook/SixthWorkbook.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/SixthWorkbook/SixthWorkbook.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/SixthWorkbook/SixthWorkbook.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/SixthWorkbook/SixthWorkbook.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/SixthWorkbook/SixthWorkbook.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/SixthWorkbook/SixthWorkbook.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 0000000..8f9f627 --- /dev/null +++ b/SixthWorkbook/SixthWorkbook.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,41 @@ +{ + "pins" : [ + { + "identity" : "alamofire", + "kind" : "remoteSourceControl", + "location" : "https://github.com/Alamofire/Alamofire.git", + "state" : { + "revision" : "3dc6a42c7727c49bf26508e29b0a0b35f9c7e1ad", + "version" : "5.8.1" + } + }, + { + "identity" : "moya", + "kind" : "remoteSourceControl", + "location" : "https://github.com/Moya/Moya.git", + "state" : { + "branch" : "master", + "revision" : "963654cd4f82d17d7546b9d6127c29f6df091717" + } + }, + { + "identity" : "reactiveswift", + "kind" : "remoteSourceControl", + "location" : "https://github.com/ReactiveCocoa/ReactiveSwift.git", + "state" : { + "revision" : "c43bae3dac73fdd3cb906bd5a1914686ca71ed3c", + "version" : "6.7.0" + } + }, + { + "identity" : "rxswift", + "kind" : "remoteSourceControl", + "location" : "https://github.com/ReactiveX/RxSwift.git", + "state" : { + "revision" : "9dcaa4b333db437b0fbfaf453fad29069044a8b4", + "version" : "6.6.0" + } + } + ], + "version" : 2 +} diff --git a/SixthWorkbook/SixthWorkbook/APIExercise_SwiftUI/WeatherAPI.swift b/SixthWorkbook/SixthWorkbook/APIExercise_SwiftUI/WeatherAPI.swift new file mode 100644 index 0000000..db6572c --- /dev/null +++ b/SixthWorkbook/SixthWorkbook/APIExercise_SwiftUI/WeatherAPI.swift @@ -0,0 +1,45 @@ +// +// WeatherAPI.swift +// SixthWorkbook +// +// Created by 김수민 on 2023/12/09. +// + +import Foundation +import Moya + +enum WeatherAPI { + case oneCall(lat: Double, lon: Double, exclude: [String], apiKey: String) +} + +extension WeatherAPI: TargetType { + var baseURL: URL { + return URL(string: "https://api.openweathermap.org/data/3.0")! + } + + var path: String { + switch self { + case .oneCall: + return "/onecall" + } + } + + var method: Moya.Method { + return .get + } + + var sampleData: Data { + return Data() + } + + var task: Task { + switch self { + case let .oneCall(lat, lon, exclude, apiKey): + return .requestParameters(parameters: ["lat": lat, "lon": lon, "exclude": exclude, "appid": apiKey], encoding: URLEncoding.default) + } + } + + var headers: [String: String]? { + return ["Content-type": "application/json"] + } +} diff --git a/SixthWorkbook/SixthWorkbook/APIExercise_SwiftUI/WeatherAPIView.swift b/SixthWorkbook/SixthWorkbook/APIExercise_SwiftUI/WeatherAPIView.swift new file mode 100644 index 0000000..2fac02b --- /dev/null +++ b/SixthWorkbook/SixthWorkbook/APIExercise_SwiftUI/WeatherAPIView.swift @@ -0,0 +1,58 @@ +// +// WeatherAPIView.swift +// SixthWorkbook +// +// Created by 김수민 on 2023/12/09. +// + +import SwiftUI +import Moya + +struct WeatherAPIView: View { + let apiKey = "206b9ba8742999c6453ebc8907feef22" + let provider = MoyaProvider() + + @State private var apiResult: String = "안녕하세요" + + var body: some View { + VStack { + Text(apiResult) + .font(.system(size: 16)) + .padding() + + Button(action: setAPIValue) { + Text("API 호출") + .foregroundColor(.white) + .padding() + .background(Color.blue) + } + .padding() + } + + } + + // API 호출 예제 + func setAPIValue() { + provider.request(.oneCall(lat: 37.7749, lon: -122.4194, exclude: ["current", "minutely", "hourly", "daily", "alerts"], apiKey: self.apiKey)) { result in + switch result { + case let .success(response): + // API 요청이 성공한 경우 처리 + print(response) + let result = try? response.map(weather.self) + if let result = result?.timezone { + self.apiResult = result + print(result) + } + case let .failure(error): + // API 요청이 실패한 경우 처리 + print(error) + } + } + } +} + +struct WeatherAPIView_Previews: PreviewProvider { + static var previews: some View { + WeatherAPIView() + } +} diff --git a/SixthWorkbook/SixthWorkbook/APIExercise_SwiftUI/weather.swift b/SixthWorkbook/SixthWorkbook/APIExercise_SwiftUI/weather.swift new file mode 100644 index 0000000..7c311e3 --- /dev/null +++ b/SixthWorkbook/SixthWorkbook/APIExercise_SwiftUI/weather.swift @@ -0,0 +1,15 @@ +// +// weatherModel.swift +// SixthWorkbook +// +// Created by 김수민 on 2023/12/09. +// + +import Foundation + +struct weather: Decodable { + var lat: Double + var lon: Double + var timezone: String + var timezone_offset: Int +} diff --git a/SixthWorkbook/SixthWorkbook/Assets.xcassets/AccentColor.colorset/Contents.json b/SixthWorkbook/SixthWorkbook/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/SixthWorkbook/SixthWorkbook/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SixthWorkbook/SixthWorkbook/Assets.xcassets/AppIcon.appiconset/Contents.json b/SixthWorkbook/SixthWorkbook/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/SixthWorkbook/SixthWorkbook/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SixthWorkbook/SixthWorkbook/Assets.xcassets/Contents.json b/SixthWorkbook/SixthWorkbook/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/SixthWorkbook/SixthWorkbook/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SixthWorkbook/SixthWorkbook/ContentView.swift b/SixthWorkbook/SixthWorkbook/ContentView.swift new file mode 100644 index 0000000..2c2b1d9 --- /dev/null +++ b/SixthWorkbook/SixthWorkbook/ContentView.swift @@ -0,0 +1,169 @@ +import SwiftUI + +struct ContentView: View { + let coloredNavAppearance = UINavigationBarAppearance() + @State var tag:Int? = nil + + init() { + coloredNavAppearance.configureWithOpaqueBackground() + coloredNavAppearance.backgroundColor = UIColor.systemMint + coloredNavAppearance.titleTextAttributes = [.foregroundColor: UIColor.white] + coloredNavAppearance.largeTitleTextAttributes = [.foregroundColor: UIColor.white] + UINavigationBar.appearance().standardAppearance = coloredNavAppearance + UINavigationBar.appearance().scrollEdgeAppearance = coloredNavAppearance + } + + var body: some View { + let buttons = ["Button 1", "Button 2", "Button 3", "Button 4", "Button 5", "Button 6"] + NavigationView { + VStack { + // ScrollView 추가 + ScrollView { + // Scroll View에 표시될 내용 추가 + HStack { + Image(systemName: "magnifyingglass") + .foregroundColor(Color(.systemGray6)) + TextField("Search", text: .constant("df")) + .padding(8) + .background(Color(.systemGray6)) + .cornerRadius(8) + Spacer() + + } + .padding() + .frame(maxWidth: .infinity) + .background(.mint) + NavigationLink(destination: secondNextView(), tag: 1, selection: self.$tag ) { + + } + Button(action: { + self.tag = 1 + print("Button Clicked!") + }) { + Text("누구나 받으세요!\n최대 12,000원 할인") + .foregroundColor(.black) + .padding() + .frame(maxWidth: .infinity) + } + + .frame(maxWidth: .infinity) + .background(Color.white) + .padding() + .cornerRadius(8) + LazyVGrid(columns: Array(repeating: GridItem(), count: 2), spacing: 16) { + ForEach(buttons, id: \.self) { buttonTitle in + Button(action: { + // 각 버튼이 클릭되었을 때의 동작 정의 + print("\(buttonTitle) Clicked!") + }) { + Text(buttonTitle) + .foregroundColor(.white) + .padding() + .frame(maxWidth: .infinity) + .background(Color.blue) + .cornerRadius(10) + } + } + } + .padding() + ScrollView(.horizontal, showsIndicators: false){ + HStack{ + ForEach(buttons, id: \.self) { buttonTitle in + Button(action: { + // 각 버튼이 클릭되었을 때의 동작 정의 + print("\(buttonTitle) Clicked!") + }) { + Text(buttonTitle) + .foregroundColor(.white) + .padding() + .frame(maxWidth: .infinity) + .background(Color.blue) + .cornerRadius(10) + } + } + } + .padding() + } + + Text("Item 0") + .padding() + .frame(maxWidth: .infinity) + .frame(height: 100) + Text("Item 0") + .padding() + .frame(maxWidth: .infinity) + Text("Item 0") + .padding() + .frame(maxWidth: .infinity) + Text("Item 0") + .padding() + .frame(maxWidth: .infinity) + .frame(height: 400) + } + .frame(maxWidth: .infinity) + .background(Color(.systemGray5)) + // 하단에 버튼 추가 + HStack { + TabButtonView(image: "magnifyingglass", title: "검색") + .frame(maxWidth: .infinity) + TabButtonView(image: "heart", title: "찜") + .frame(maxWidth: .infinity) + TabButtonView(image: "heart", title: "찜") + .frame(maxWidth: .infinity) + TabButtonView(image: "heart", title: "찜") + .frame(maxWidth: .infinity) + NavigationLink(destination: WeatherAPIView(), tag: 3, selection: self.$tag ) { + } + Button(action: {self.tag = 3}){ + VStack{ + Image(systemName: "book") + Text("날씨API") + } + }.frame(maxWidth: .infinity) + NavigationLink(destination: LogInView(), tag: 2, selection: self.$tag ) { + } + Button(action: {self.tag = 2}){ + VStack{ + Image(systemName: "person") + Text("로그인") + } + }.frame(maxWidth: .infinity) + + } + .frame(maxWidth: .infinity) + .frame(height: 20) + .padding() + + } + .navigationBarItems( + leading: + Text("동작구 여의대방로 44길 46") + .foregroundColor(.white) + .font(.headline), + trailing: + HStack { + Button(action: { print("click button") }) { + Image(systemName: "line.horizontal.3") + .imageScale(.large) + .foregroundColor(.white) + .padding() + } + Button(action: { print("click button") }) { + Image(systemName: "alarm") + .imageScale(.large) + .foregroundColor(.white) + .padding() + } + } + ) + } + } +} + +struct contentView_Previews: PreviewProvider { + static var previews: some View { + ContentView() + } +} + + diff --git a/SixthWorkbook/SixthWorkbook/LogInExercise_SwiftUI/LogInView.swift b/SixthWorkbook/SixthWorkbook/LogInExercise_SwiftUI/LogInView.swift new file mode 100644 index 0000000..5d181fe --- /dev/null +++ b/SixthWorkbook/SixthWorkbook/LogInExercise_SwiftUI/LogInView.swift @@ -0,0 +1,104 @@ +// +// LogInView.swift +// SixthWorkbook +// +// Created by 김수민 on 2023/12/09. +// + +import SwiftUI + +struct LogInView: View { + @State private var id: String = "" + @State private var password: String = "" + @State private var isAutoLogin: Bool = false + @State private var showAlert: Bool = false + @State private var alertMessage: String = "" + var body: some View { + VStack { + Text("이것은 푸터입니다.") + .padding() + + TextField("Enter ID", text: $id) + .textFieldStyle(RoundedBorderTextFieldStyle()) + .padding() + + SecureField("Enter Password", text: $password) + .textFieldStyle(RoundedBorderTextFieldStyle()) + .padding() + + Button(action: loginButtonTapped) { + Text("로그인") + .foregroundColor(.white) + .padding() + .frame(width: 200) + .background(Color.cyan) + } + + Button(action: registerButtonTapped) { + Text("회원가입") + .foregroundColor(.white) + .padding() + .frame(width: 200) + .background(Color.cyan) + } + + Button(action: logOutTapped) { + Text("로그아웃") + .foregroundColor(.white) + .padding() + .frame(width: 200) + .background(Color.cyan) + } + } + .alert(isPresented: $showAlert) { + Alert(title: Text("자동 로그인 활성화"), message: Text(alertMessage), primaryButton: .default(Text("예"), action: { + UserDefaults.standard.set(true, forKey: "isAutoLogin") + }), secondaryButton: .default(Text("아니요"), action: { + UserDefaults.standard.set(false, forKey: "isAutoLogin") + })) + } + .onAppear { + if UserDefaults.standard.bool(forKey: "isAutoLogin") { + alertMessage = "자동 로그인을 활성화 하시겠습니까?" + showAlert = true + } + } + } + + func loginButtonTapped() { + if loginSuccessChecking() { + alertMessage = "로그인 완료!" + showAlert = true + } else { + alertMessage = "로그인 실패 ㅠㅠ" + showAlert = true + } + } + + func registerButtonTapped() { + guard !id.isEmpty, !password.isEmpty else { + alertMessage = "값을 입력해주세요." + showAlert = true + return + } + UserDefaults.standard.set(id, forKey: "id") + UserDefaults.standard.set(password, forKey: "password") + alertMessage = "회원가입 완료!" + showAlert = true + } + + func logOutTapped() { + UserDefaults.standard.removeObject(forKey: "isAutoLogin") + } + + func loginSuccessChecking() -> Bool { + return UserDefaults.standard.string(forKey: "id") == id && UserDefaults.standard.string(forKey: "password") == password + } + +} + +struct LogInView_Previews: PreviewProvider { + static var previews: some View { + LogInView() + } +} diff --git a/SixthWorkbook/SixthWorkbook/LogInExercise_SwiftUI/UserDefaultKey.swift b/SixthWorkbook/SixthWorkbook/LogInExercise_SwiftUI/UserDefaultKey.swift new file mode 100644 index 0000000..dd704a0 --- /dev/null +++ b/SixthWorkbook/SixthWorkbook/LogInExercise_SwiftUI/UserDefaultKey.swift @@ -0,0 +1,14 @@ +// +// UserDefaultKey.swift +// SixthWorkbook +// +// Created by 김수민 on 2023/12/09. +// + +import Foundation + +enum UserDefaultKey: String { + case isAutoLogin //활성화시 success + case id + case password +} diff --git a/SixthWorkbook/SixthWorkbook/NavigationExercise_SwiftUI/SecondNextView.swift b/SixthWorkbook/SixthWorkbook/NavigationExercise_SwiftUI/SecondNextView.swift new file mode 100644 index 0000000..833fed3 --- /dev/null +++ b/SixthWorkbook/SixthWorkbook/NavigationExercise_SwiftUI/SecondNextView.swift @@ -0,0 +1,65 @@ +// +// SecondNextView.swift +// SixthWorkbook +// +// Created by 김수민 on 2023/12/09. +// + +import SwiftUI + +struct secondNextView: View { + @State var tag:Int? = nil + @State private var count = 0 + @State private var showNextView = false + + var body: some View { + HStack { + + Button(action: { + count += 1 + }) { + Image(systemName: "plus") + .padding() + .background(Color.blue) + .foregroundColor(.white) + .clipShape(Circle()) + } + Text("Count: \(count)") + .font(.title) + Button(action: { + if count > 0 { + count -= 1 + } + }) { + Image(systemName: "minus") + .padding() + .background(Color.red) + .foregroundColor(.white) + .clipShape(Circle()) + } + Text("") + } + NavigationLink(destination: thirdNextView(countValue: count), tag: 1, selection: self.$tag ) { + } + HStack { + + Button(action: { + self.tag = 1 + + print("Button Clicked!") + }) { + Text("확인") + .foregroundColor(.black) + .padding() + .frame(maxWidth: 200) + } + .background(.mint) + } + } +} + +struct SecondNextView_Previews: PreviewProvider { + static var previews: some View { + secondNextView() + } +} diff --git a/SixthWorkbook/SixthWorkbook/NavigationExercise_SwiftUI/ThirdNextView.swift b/SixthWorkbook/SixthWorkbook/NavigationExercise_SwiftUI/ThirdNextView.swift new file mode 100644 index 0000000..869fd62 --- /dev/null +++ b/SixthWorkbook/SixthWorkbook/NavigationExercise_SwiftUI/ThirdNextView.swift @@ -0,0 +1,25 @@ +// +// ThirdNextView.swift +// SixthWorkbook +// +// Created by 김수민 on 2023/12/09. +// + +import SwiftUI + +struct thirdNextView: View { + let countValue: Int + var body: some View { + VStack { + Text("This is \(countValue)") + .padding() + } + .navigationTitle("Next View") + } +} + +struct ThirdNextView_Previews: PreviewProvider { + static var previews: some View { + thirdNextView(countValue: 2) + } +} diff --git a/SixthWorkbook/SixthWorkbook/Preview Content/Preview Assets.xcassets/Contents.json b/SixthWorkbook/SixthWorkbook/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/SixthWorkbook/SixthWorkbook/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SixthWorkbook/SixthWorkbook/SixthWorkbookApp.swift b/SixthWorkbook/SixthWorkbook/SixthWorkbookApp.swift new file mode 100644 index 0000000..9944d0d --- /dev/null +++ b/SixthWorkbook/SixthWorkbook/SixthWorkbookApp.swift @@ -0,0 +1,17 @@ +// +// SixthWorkbookApp.swift +// SixthWorkbook +// +// Created by 김수민 on 2023/11/23. +// + +import SwiftUI + +@main +struct SixthWorkbookApp: App { + var body: some Scene { + WindowGroup { + ContentView() + } + } +} diff --git a/SixthWorkbook/SixthWorkbook/TabButtonView.swift b/SixthWorkbook/SixthWorkbook/TabButtonView.swift new file mode 100644 index 0000000..20d6bdb --- /dev/null +++ b/SixthWorkbook/SixthWorkbook/TabButtonView.swift @@ -0,0 +1,27 @@ +// +// TabButtonView.swift +// SixthWorkbook +// +// Created by 김수민 on 2023/12/08. +// + +import SwiftUI + +struct TabButtonView: View { + var image: String = "" + var title: String = "" + var body: some View { + Button(action: {}){ + VStack{ + Image(systemName: image) + Text(title) + } + } + } +} + +struct TabButtonView_Previews: PreviewProvider { + static var previews: some View { + TabButtonView(image: "heart", title: "찜") + } +}