diff --git a/.DS_Store b/.DS_Store index 260a0ae..bf853e9 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/MySwiftUI/MySwiftUI.xcodeproj/project.pbxproj b/MySwiftUI/MySwiftUI.xcodeproj/project.pbxproj new file mode 100644 index 0000000..a3079af --- /dev/null +++ b/MySwiftUI/MySwiftUI.xcodeproj/project.pbxproj @@ -0,0 +1,624 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + 56A8AECA2939FD4A00568FDE /* MySecureField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56A8AEC92939FD4A00568FDE /* MySecureField.swift */; }; + 56A8AECC293A040700568FDE /* MyProgressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56A8AECB293A040700568FDE /* MyProgressView.swift */; }; + 56A8AECE293A07E200568FDE /* MyLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56A8AECD293A07E200568FDE /* MyLabel.swift */; }; + 56A8AED0293A0AA700568FDE /* MyNavigationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56A8AECF293A0AA700568FDE /* MyNavigationView.swift */; }; + 56A8AED2293A0EC800568FDE /* MyNavigationStack.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56A8AED1293A0EC700568FDE /* MyNavigationStack.swift */; }; + 56A8AED4293A1BAA00568FDE /* MyOnAppear.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56A8AED3293A1BAA00568FDE /* MyOnAppear.swift */; }; + 56A8AED7293A281F00568FDE /* MySecondProject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56A8AED6293A281F00568FDE /* MySecondProject.swift */; }; + 56C250832935ECC1004EB9A1 /* MySwiftUIApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56C250822935ECC1004EB9A1 /* MySwiftUIApp.swift */; }; + 56C250852935ECC1004EB9A1 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56C250842935ECC1004EB9A1 /* ContentView.swift */; }; + 56C250872935ECC1004EB9A1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 56C250862935ECC1004EB9A1 /* Assets.xcassets */; }; + 56C2508A2935ECC1004EB9A1 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 56C250892935ECC1004EB9A1 /* Preview Assets.xcassets */; }; + 56C250942935ECC2004EB9A1 /* MySwiftUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56C250932935ECC2004EB9A1 /* MySwiftUITests.swift */; }; + 56C2509E2935ECC2004EB9A1 /* MySwiftUIUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56C2509D2935ECC2004EB9A1 /* MySwiftUIUITests.swift */; }; + 56C250A02935ECC2004EB9A1 /* MySwiftUIUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56C2509F2935ECC2004EB9A1 /* MySwiftUIUITestsLaunchTests.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 56C250902935ECC2004EB9A1 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 56C250772935ECC1004EB9A1 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 56C2507E2935ECC1004EB9A1; + remoteInfo = MySwiftUI; + }; + 56C2509A2935ECC2004EB9A1 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 56C250772935ECC1004EB9A1 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 56C2507E2935ECC1004EB9A1; + remoteInfo = MySwiftUI; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 56A8AEC92939FD4A00568FDE /* MySecureField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MySecureField.swift; sourceTree = ""; }; + 56A8AECB293A040700568FDE /* MyProgressView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyProgressView.swift; sourceTree = ""; }; + 56A8AECD293A07E200568FDE /* MyLabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyLabel.swift; sourceTree = ""; }; + 56A8AECF293A0AA700568FDE /* MyNavigationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyNavigationView.swift; sourceTree = ""; }; + 56A8AED1293A0EC700568FDE /* MyNavigationStack.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyNavigationStack.swift; sourceTree = ""; }; + 56A8AED3293A1BAA00568FDE /* MyOnAppear.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyOnAppear.swift; sourceTree = ""; }; + 56A8AED6293A281F00568FDE /* MySecondProject.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MySecondProject.swift; sourceTree = ""; }; + 56C2507F2935ECC1004EB9A1 /* MySwiftUI.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MySwiftUI.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 56C250822935ECC1004EB9A1 /* MySwiftUIApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MySwiftUIApp.swift; sourceTree = ""; }; + 56C250842935ECC1004EB9A1 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + 56C250862935ECC1004EB9A1 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 56C250892935ECC1004EB9A1 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + 56C2508F2935ECC2004EB9A1 /* MySwiftUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MySwiftUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 56C250932935ECC2004EB9A1 /* MySwiftUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MySwiftUITests.swift; sourceTree = ""; }; + 56C250992935ECC2004EB9A1 /* MySwiftUIUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MySwiftUIUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 56C2509D2935ECC2004EB9A1 /* MySwiftUIUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MySwiftUIUITests.swift; sourceTree = ""; }; + 56C2509F2935ECC2004EB9A1 /* MySwiftUIUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MySwiftUIUITestsLaunchTests.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 56C2507C2935ECC1004EB9A1 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 56C2508C2935ECC2004EB9A1 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 56C250962935ECC2004EB9A1 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 56C250762935ECC1004EB9A1 = { + isa = PBXGroup; + children = ( + 56C250812935ECC1004EB9A1 /* MySwiftUI */, + 56C250922935ECC2004EB9A1 /* MySwiftUITests */, + 56C2509C2935ECC2004EB9A1 /* MySwiftUIUITests */, + 56C250802935ECC1004EB9A1 /* Products */, + ); + sourceTree = ""; + }; + 56C250802935ECC1004EB9A1 /* Products */ = { + isa = PBXGroup; + children = ( + 56C2507F2935ECC1004EB9A1 /* MySwiftUI.app */, + 56C2508F2935ECC2004EB9A1 /* MySwiftUITests.xctest */, + 56C250992935ECC2004EB9A1 /* MySwiftUIUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 56C250812935ECC1004EB9A1 /* MySwiftUI */ = { + isa = PBXGroup; + children = ( + 56C250822935ECC1004EB9A1 /* MySwiftUIApp.swift */, + 56C250AC2935ECCF004EB9A1 /* 5week */, + 56C250842935ECC1004EB9A1 /* ContentView.swift */, + 56C250862935ECC1004EB9A1 /* Assets.xcassets */, + 56C250882935ECC1004EB9A1 /* Preview Content */, + ); + path = MySwiftUI; + sourceTree = ""; + }; + 56C250882935ECC1004EB9A1 /* Preview Content */ = { + isa = PBXGroup; + children = ( + 56C250892935ECC1004EB9A1 /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; + 56C250922935ECC2004EB9A1 /* MySwiftUITests */ = { + isa = PBXGroup; + children = ( + 56C250932935ECC2004EB9A1 /* MySwiftUITests.swift */, + ); + path = MySwiftUITests; + sourceTree = ""; + }; + 56C2509C2935ECC2004EB9A1 /* MySwiftUIUITests */ = { + isa = PBXGroup; + children = ( + 56C2509D2935ECC2004EB9A1 /* MySwiftUIUITests.swift */, + 56C2509F2935ECC2004EB9A1 /* MySwiftUIUITestsLaunchTests.swift */, + ); + path = MySwiftUIUITests; + sourceTree = ""; + }; + 56C250AC2935ECCF004EB9A1 /* 5week */ = { + isa = PBXGroup; + children = ( + 56A8AEC92939FD4A00568FDE /* MySecureField.swift */, + 56A8AECB293A040700568FDE /* MyProgressView.swift */, + 56A8AECD293A07E200568FDE /* MyLabel.swift */, + 56A8AECF293A0AA700568FDE /* MyNavigationView.swift */, + 56A8AED1293A0EC700568FDE /* MyNavigationStack.swift */, + 56A8AED3293A1BAA00568FDE /* MyOnAppear.swift */, + 56A8AED6293A281F00568FDE /* MySecondProject.swift */, + ); + path = 5week; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 56C2507E2935ECC1004EB9A1 /* MySwiftUI */ = { + isa = PBXNativeTarget; + buildConfigurationList = 56C250A32935ECC2004EB9A1 /* Build configuration list for PBXNativeTarget "MySwiftUI" */; + buildPhases = ( + 56C2507B2935ECC1004EB9A1 /* Sources */, + 56C2507C2935ECC1004EB9A1 /* Frameworks */, + 56C2507D2935ECC1004EB9A1 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = MySwiftUI; + productName = MySwiftUI; + productReference = 56C2507F2935ECC1004EB9A1 /* MySwiftUI.app */; + productType = "com.apple.product-type.application"; + }; + 56C2508E2935ECC2004EB9A1 /* MySwiftUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 56C250A62935ECC2004EB9A1 /* Build configuration list for PBXNativeTarget "MySwiftUITests" */; + buildPhases = ( + 56C2508B2935ECC2004EB9A1 /* Sources */, + 56C2508C2935ECC2004EB9A1 /* Frameworks */, + 56C2508D2935ECC2004EB9A1 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 56C250912935ECC2004EB9A1 /* PBXTargetDependency */, + ); + name = MySwiftUITests; + productName = MySwiftUITests; + productReference = 56C2508F2935ECC2004EB9A1 /* MySwiftUITests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 56C250982935ECC2004EB9A1 /* MySwiftUIUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 56C250A92935ECC2004EB9A1 /* Build configuration list for PBXNativeTarget "MySwiftUIUITests" */; + buildPhases = ( + 56C250952935ECC2004EB9A1 /* Sources */, + 56C250962935ECC2004EB9A1 /* Frameworks */, + 56C250972935ECC2004EB9A1 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 56C2509B2935ECC2004EB9A1 /* PBXTargetDependency */, + ); + name = MySwiftUIUITests; + productName = MySwiftUIUITests; + productReference = 56C250992935ECC2004EB9A1 /* MySwiftUIUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 56C250772935ECC1004EB9A1 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1410; + LastUpgradeCheck = 1410; + TargetAttributes = { + 56C2507E2935ECC1004EB9A1 = { + CreatedOnToolsVersion = 14.1; + }; + 56C2508E2935ECC2004EB9A1 = { + CreatedOnToolsVersion = 14.1; + TestTargetID = 56C2507E2935ECC1004EB9A1; + }; + 56C250982935ECC2004EB9A1 = { + CreatedOnToolsVersion = 14.1; + TestTargetID = 56C2507E2935ECC1004EB9A1; + }; + }; + }; + buildConfigurationList = 56C2507A2935ECC1004EB9A1 /* Build configuration list for PBXProject "MySwiftUI" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 56C250762935ECC1004EB9A1; + productRefGroup = 56C250802935ECC1004EB9A1 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 56C2507E2935ECC1004EB9A1 /* MySwiftUI */, + 56C2508E2935ECC2004EB9A1 /* MySwiftUITests */, + 56C250982935ECC2004EB9A1 /* MySwiftUIUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 56C2507D2935ECC1004EB9A1 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 56C2508A2935ECC1004EB9A1 /* Preview Assets.xcassets in Resources */, + 56C250872935ECC1004EB9A1 /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 56C2508D2935ECC2004EB9A1 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 56C250972935ECC2004EB9A1 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 56C2507B2935ECC1004EB9A1 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 56A8AECA2939FD4A00568FDE /* MySecureField.swift in Sources */, + 56A8AED2293A0EC800568FDE /* MyNavigationStack.swift in Sources */, + 56A8AECE293A07E200568FDE /* MyLabel.swift in Sources */, + 56A8AED0293A0AA700568FDE /* MyNavigationView.swift in Sources */, + 56A8AECC293A040700568FDE /* MyProgressView.swift in Sources */, + 56C250852935ECC1004EB9A1 /* ContentView.swift in Sources */, + 56C250832935ECC1004EB9A1 /* MySwiftUIApp.swift in Sources */, + 56A8AED4293A1BAA00568FDE /* MyOnAppear.swift in Sources */, + 56A8AED7293A281F00568FDE /* MySecondProject.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 56C2508B2935ECC2004EB9A1 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 56C250942935ECC2004EB9A1 /* MySwiftUITests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 56C250952935ECC2004EB9A1 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 56C250A02935ECC2004EB9A1 /* MySwiftUIUITestsLaunchTests.swift in Sources */, + 56C2509E2935ECC2004EB9A1 /* MySwiftUIUITests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 56C250912935ECC2004EB9A1 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 56C2507E2935ECC1004EB9A1 /* MySwiftUI */; + targetProxy = 56C250902935ECC2004EB9A1 /* PBXContainerItemProxy */; + }; + 56C2509B2935ECC2004EB9A1 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 56C2507E2935ECC1004EB9A1 /* MySwiftUI */; + targetProxy = 56C2509A2935ECC2004EB9A1 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 56C250A12935ECC2004EB9A1 /* 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.1; + 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; + }; + 56C250A22935ECC2004EB9A1 /* 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.1; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 56C250A42935ECC2004EB9A1 /* 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 = "\"MySwiftUI/Preview Content\""; + DEVELOPMENT_TEAM = LVBHWHTSNF; + 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 = com.lee.MySwiftUI; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 56C250A52935ECC2004EB9A1 /* 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 = "\"MySwiftUI/Preview Content\""; + DEVELOPMENT_TEAM = LVBHWHTSNF; + 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 = com.lee.MySwiftUI; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 56C250A72935ECC2004EB9A1 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = LVBHWHTSNF; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.1; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.lee.MySwiftUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MySwiftUI.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/MySwiftUI"; + }; + name = Debug; + }; + 56C250A82935ECC2004EB9A1 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = LVBHWHTSNF; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.1; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.lee.MySwiftUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MySwiftUI.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/MySwiftUI"; + }; + name = Release; + }; + 56C250AA2935ECC2004EB9A1 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = LVBHWHTSNF; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.lee.MySwiftUIUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = MySwiftUI; + }; + name = Debug; + }; + 56C250AB2935ECC2004EB9A1 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = LVBHWHTSNF; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.lee.MySwiftUIUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = MySwiftUI; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 56C2507A2935ECC1004EB9A1 /* Build configuration list for PBXProject "MySwiftUI" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 56C250A12935ECC2004EB9A1 /* Debug */, + 56C250A22935ECC2004EB9A1 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 56C250A32935ECC2004EB9A1 /* Build configuration list for PBXNativeTarget "MySwiftUI" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 56C250A42935ECC2004EB9A1 /* Debug */, + 56C250A52935ECC2004EB9A1 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 56C250A62935ECC2004EB9A1 /* Build configuration list for PBXNativeTarget "MySwiftUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 56C250A72935ECC2004EB9A1 /* Debug */, + 56C250A82935ECC2004EB9A1 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 56C250A92935ECC2004EB9A1 /* Build configuration list for PBXNativeTarget "MySwiftUIUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 56C250AA2935ECC2004EB9A1 /* Debug */, + 56C250AB2935ECC2004EB9A1 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 56C250772935ECC1004EB9A1 /* Project object */; +} diff --git a/MySwiftUI/MySwiftUI.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/MySwiftUI/MySwiftUI.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/MySwiftUI/MySwiftUI.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/MySwiftUI/MySwiftUI.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/MySwiftUI/MySwiftUI.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/MySwiftUI/MySwiftUI.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/MySwiftUI/MySwiftUI.xcodeproj/project.xcworkspace/xcuserdata/jihee.xcuserdatad/UserInterfaceState.xcuserstate b/MySwiftUI/MySwiftUI.xcodeproj/project.xcworkspace/xcuserdata/jihee.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..1a6758b Binary files /dev/null and b/MySwiftUI/MySwiftUI.xcodeproj/project.xcworkspace/xcuserdata/jihee.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/MySwiftUI/MySwiftUI.xcodeproj/xcuserdata/jihee.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/MySwiftUI/MySwiftUI.xcodeproj/xcuserdata/jihee.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..d82d3e0 --- /dev/null +++ b/MySwiftUI/MySwiftUI.xcodeproj/xcuserdata/jihee.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/MySwiftUI/MySwiftUI.xcodeproj/xcuserdata/jihee.xcuserdatad/xcschemes/xcschememanagement.plist b/MySwiftUI/MySwiftUI.xcodeproj/xcuserdata/jihee.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..72faa81 --- /dev/null +++ b/MySwiftUI/MySwiftUI.xcodeproj/xcuserdata/jihee.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + MySwiftUI.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/MySwiftUI/MySwiftUI/.DS_Store b/MySwiftUI/MySwiftUI/.DS_Store new file mode 100644 index 0000000..ca2a2dd Binary files /dev/null and b/MySwiftUI/MySwiftUI/.DS_Store differ diff --git a/MySwiftUI/MySwiftUI/5week/MyLabel.swift b/MySwiftUI/MySwiftUI/5week/MyLabel.swift new file mode 100644 index 0000000..999921e --- /dev/null +++ b/MySwiftUI/MySwiftUI/5week/MyLabel.swift @@ -0,0 +1,33 @@ +// +// MyLabel.swift +// MySwiftUI +// +// Created by 이지희 on 2022/12/02. +// + +import SwiftUI + +struct MyLabel: View { + var body: some View { + VStack{ + Text("1. Text + Image") + .foregroundColor(.orange) + .padding() + HStack{ + Text(Image(systemName: "hand.raised")) + Text("Hello") + } + Divider() + Text("2. Label") + .foregroundColor(.orange) + .padding() + Label("Hello", systemImage: "hand.raised") + } + } +} + +struct MyLabel_Previews: PreviewProvider { + static var previews: some View { + MyLabel() + } +} diff --git a/MySwiftUI/MySwiftUI/5week/MyNavigationStack.swift b/MySwiftUI/MySwiftUI/5week/MyNavigationStack.swift new file mode 100644 index 0000000..2004a3d --- /dev/null +++ b/MySwiftUI/MySwiftUI/5week/MyNavigationStack.swift @@ -0,0 +1,32 @@ +// +// MyNavigationStack.swift +// MySwiftUI +// +// Created by 이지희 on 2022/12/02. +// + +import SwiftUI + +struct MyNavigationStack: View { + var myName: String = "JH" + + var body: some View { + NavigationStack { + NavigationLink(value: myName) { + Text("click") + }.navigationDestination(for: String.self) { value in + ZStack{ + Color(.yellow) + Text("Hello \(value)") + } + } + } + } +} + + +struct MyNavigationStack_Previews: PreviewProvider { + static var previews: some View { + MyNavigationStack() + } +} diff --git a/MySwiftUI/MySwiftUI/5week/MyNavigationView.swift b/MySwiftUI/MySwiftUI/5week/MyNavigationView.swift new file mode 100644 index 0000000..e1cd138 --- /dev/null +++ b/MySwiftUI/MySwiftUI/5week/MyNavigationView.swift @@ -0,0 +1,48 @@ +// +// MyNavigationView.swift +// MySwiftUI +// +// Created by 이지희 on 2022/12/02. +// + +import SwiftUI + +struct MyNavigationView: View { + var pinkView: some View{ + ZStack{ + Color(.systemPink) + Text("pink") + .foregroundColor(.white) + .font(.title) + } + } + + var blueView: some View{ + ZStack{ + Color(.blue) + Text("blue") + .foregroundColor(.white) + .font(.title) + } + } + + var body: some View { + NavigationView { + VStack{ + NavigationLink(destination: pinkView) { + Text("pinkView로 이동") + } + .padding() + NavigationLink(destination: blueView) { + Text("blueView로 이동") + } + }.navigationTitle("Main") + } + } +} + +struct MyNavigationView_Previews: PreviewProvider { + static var previews: some View { + MyNavigationView() + } +} diff --git a/MySwiftUI/MySwiftUI/5week/MyOnAppear.swift b/MySwiftUI/MySwiftUI/5week/MyOnAppear.swift new file mode 100644 index 0000000..0e5d21c --- /dev/null +++ b/MySwiftUI/MySwiftUI/5week/MyOnAppear.swift @@ -0,0 +1,36 @@ +// +// MyOnAppear.swift +// MySwiftUI +// +// Created by 이지희 on 2022/12/02. +// + +import SwiftUI + +struct MyOnAppear: View { + @State var isPresented: Bool = false + + var body: some View { + VStack{ + Text("Hello") + .onAppear{print("text appear")} + .onDisappear{print("text disappear")} + .sheet(isPresented: $isPresented) { + Color(.yellow) + .onAppear{print("color appear")} + .onDisappear{print("color disappear")} + } + Button { + isPresented.toggle() + } label: { + Text("click!") + } + } + } +} + +struct MyOnAppear_Previews: PreviewProvider { + static var previews: some View { + MyOnAppear() + } +} diff --git a/MySwiftUI/MySwiftUI/5week/MyProgressView.swift b/MySwiftUI/MySwiftUI/5week/MyProgressView.swift new file mode 100644 index 0000000..6495c99 --- /dev/null +++ b/MySwiftUI/MySwiftUI/5week/MyProgressView.swift @@ -0,0 +1,42 @@ +// +// MyProgressView.swift +// MySwiftUI +// +// Created by 이지희 on 2022/12/02. +// + +import SwiftUI + +struct MyProgressView: View { + @State var progress: Double = 0 + + var body: some View { + VStack{ + Text("1. 로딩 화면") + ProgressView() + Spacer() + + Text("2. 로딩 화면 + 텍스트") + ProgressView { + Text("잠시만 기다려주세요") + } + Spacer() + + Text("3. 로딩 진행도") + ProgressView("Loaing...", value: progress, total: 100) + Button { + progress += 5 + } label: { + Text("Go") + } + } + .padding(40) + .padding([.top, .bottom], 80) + } +} + +struct MyProgressView_Previews: PreviewProvider { + static var previews: some View { + MyProgressView() + } +} diff --git a/MySwiftUI/MySwiftUI/5week/MySecondProject.swift b/MySwiftUI/MySwiftUI/5week/MySecondProject.swift new file mode 100644 index 0000000..d2c0f75 --- /dev/null +++ b/MySwiftUI/MySwiftUI/5week/MySecondProject.swift @@ -0,0 +1,73 @@ +// +// MySecondProject.swift +// MySwiftUI +// +// Created by 이지희 on 2022/12/02. +// + +import SwiftUI + +struct MySecondProject: View { + @State var userId: String = "" + @State var userPassword: String = "" + @State var hasLoggedIn = false + @State var showPassword: Bool = false + @State var showAlert: Bool = false + + + var body: some View { + VStack{ + VStack(alignment: .leading){ + Label("ID", systemImage: "person.fill") + TextField("아이디를 입력해주세요", text: $userId) + .autocapitalization(.none) + } + .padding() + VStack(alignment: .leading){ + HStack{ + Label("Password", systemImage: "lock.fill") + Toggle(isOn: $showPassword){ + //label 적는 곳 + } + } + + if showPassword{ + TextField("비밀번호를 입력해주세요", text: $userPassword) + } else { + SecureField("비밀번호를 입력해주세요", text: $userPassword) + } + + } + .padding() + + Button { + if userPassword == "1234" && userId == "JH" { + hasLoggedIn = true + } else{ + hasLoggedIn = false + showAlert = true + } + } label: { + Text("Sign In") + .padding(7) + .padding([.leading, .trailing], 20) + .background(.black) + .cornerRadius(10) + .foregroundColor(.white) + } + } + .padding(30) + .sheet(isPresented: $hasLoggedIn) { + Text("Hello, \(userId)") + } + .alert(isPresented: $showAlert) { + Alert(title: Text("로그인 오류"), message: Text("아이디와 비밀번호를 확인해주세요")) + } + } +} + +struct MySecondProject_Previews: PreviewProvider { + static var previews: some View { + MySecondProject() + } +} diff --git a/MySwiftUI/MySwiftUI/5week/MySecureField.swift b/MySwiftUI/MySwiftUI/5week/MySecureField.swift new file mode 100644 index 0000000..bdc3411 --- /dev/null +++ b/MySwiftUI/MySwiftUI/5week/MySecureField.swift @@ -0,0 +1,40 @@ +// +// MySecureField.swift +// MySwiftUI +// +// Created by 이지희 on 2022/12/02. +// + +import SwiftUI + +struct MySecureField: View { + @State var myPassword: String = "" + @State var isSecureMode: Bool = true + + var body: some View { + VStack(alignment: .leading){ + Text("Password") + + HStack{ + if isSecureMode{ + SecureField("8자리 이상 입력", text: $myPassword) + } else { + TextField("8자리 이상 입력", text: $myPassword) + } + Button { + isSecureMode.toggle() + } label: { + Image(systemName: "eye") + } + } + } + .frame(width: 260) + .padding() + } +} + +struct MySecureField_Previews: PreviewProvider { + static var previews: some View { + MySecureField() + } +} diff --git a/MySwiftUI/MySwiftUI/Assets.xcassets/AccentColor.colorset/Contents.json b/MySwiftUI/MySwiftUI/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/MySwiftUI/MySwiftUI/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MySwiftUI/MySwiftUI/Assets.xcassets/AppIcon.appiconset/Contents.json b/MySwiftUI/MySwiftUI/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/MySwiftUI/MySwiftUI/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/MySwiftUI/MySwiftUI/Assets.xcassets/Contents.json b/MySwiftUI/MySwiftUI/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/MySwiftUI/MySwiftUI/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MySwiftUI/MySwiftUI/ContentView.swift b/MySwiftUI/MySwiftUI/ContentView.swift new file mode 100644 index 0000000..35d904e --- /dev/null +++ b/MySwiftUI/MySwiftUI/ContentView.swift @@ -0,0 +1,26 @@ +// +// ContentView.swift +// MySwiftUI +// +// Created by 이지희 on 2022/11/29. +// + +import SwiftUI + +struct ContentView: View { + var body: some View { + VStack { + Image(systemName: "globe") + .imageScale(.large) + .foregroundColor(.accentColor) + Text("Hello, world!") + } + .padding() + } +} + +struct ContentView_Previews: PreviewProvider { + static var previews: some View { + ContentView() + } +} diff --git a/MySwiftUI/MySwiftUI/MySwiftUIApp.swift b/MySwiftUI/MySwiftUI/MySwiftUIApp.swift new file mode 100644 index 0000000..c713346 --- /dev/null +++ b/MySwiftUI/MySwiftUI/MySwiftUIApp.swift @@ -0,0 +1,17 @@ +// +// MySwiftUIApp.swift +// MySwiftUI +// +// Created by 이지희 on 2022/11/29. +// + +import SwiftUI + +@main +struct MySwiftUIApp: App { + var body: some Scene { + WindowGroup { + MySecondProject() + } + } +} diff --git a/MySwiftUI/MySwiftUI/Preview Content/Preview Assets.xcassets/Contents.json b/MySwiftUI/MySwiftUI/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/MySwiftUI/MySwiftUI/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MySwiftUI/MySwiftUI/gitignore.md b/MySwiftUI/MySwiftUI/gitignore.md new file mode 100644 index 0000000..ac0cd21 --- /dev/null +++ b/MySwiftUI/MySwiftUI/gitignore.md @@ -0,0 +1,21 @@ +# Created by https://www.toptal.com/developers/gitignore/api/xcode +# Edit at https://www.toptal.com/developers/gitignore?templates=xcode + +### Xcode ### +## User settings +xcuserdata/ + +## Xcode 8 and earlier +*.xcscmblueprint +*.xccheckout + +### 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/xcode diff --git a/MySwiftUI/MySwiftUITests/MySwiftUITests.swift b/MySwiftUI/MySwiftUITests/MySwiftUITests.swift new file mode 100644 index 0000000..cce7867 --- /dev/null +++ b/MySwiftUI/MySwiftUITests/MySwiftUITests.swift @@ -0,0 +1,36 @@ +// +// MySwiftUITests.swift +// MySwiftUITests +// +// Created by 이지희 on 2022/11/29. +// + +import XCTest +@testable import MySwiftUI + +final class MySwiftUITests: XCTestCase { + + override func setUpWithError() throws { + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDownWithError() throws { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() throws { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + // Any test you write for XCTest can be annotated as throws and async. + // Mark your test throws to produce an unexpected failure when your test encounters an uncaught error. + // Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards. + } + + func testPerformanceExample() throws { + // This is an example of a performance test case. + self.measure { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/MySwiftUI/MySwiftUIUITests/MySwiftUIUITests.swift b/MySwiftUI/MySwiftUIUITests/MySwiftUIUITests.swift new file mode 100644 index 0000000..1dcdfbc --- /dev/null +++ b/MySwiftUI/MySwiftUIUITests/MySwiftUIUITests.swift @@ -0,0 +1,41 @@ +// +// MySwiftUIUITests.swift +// MySwiftUIUITests +// +// Created by 이지희 on 2022/11/29. +// + +import XCTest + +final class MySwiftUIUITests: XCTestCase { + + override func setUpWithError() throws { + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + continueAfterFailure = false + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. + } + + override func tearDownWithError() throws { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() throws { + // UI tests must launch the application that they test. + let app = XCUIApplication() + app.launch() + + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testLaunchPerformance() throws { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) { + // This measures how long it takes to launch your application. + measure(metrics: [XCTApplicationLaunchMetric()]) { + XCUIApplication().launch() + } + } + } +} diff --git a/MySwiftUI/MySwiftUIUITests/MySwiftUIUITestsLaunchTests.swift b/MySwiftUI/MySwiftUIUITests/MySwiftUIUITestsLaunchTests.swift new file mode 100644 index 0000000..d677a76 --- /dev/null +++ b/MySwiftUI/MySwiftUIUITests/MySwiftUIUITestsLaunchTests.swift @@ -0,0 +1,32 @@ +// +// MySwiftUIUITestsLaunchTests.swift +// MySwiftUIUITests +// +// Created by 이지희 on 2022/11/29. +// + +import XCTest + +final class MySwiftUIUITestsLaunchTests: XCTestCase { + + override class var runsForEachTargetApplicationUIConfiguration: Bool { + true + } + + override func setUpWithError() throws { + continueAfterFailure = false + } + + func testLaunch() throws { + let app = XCUIApplication() + app.launch() + + // Insert steps here to perform after app launch but before taking a screenshot, + // such as logging into a test account or navigating somewhere in the app + + let attachment = XCTAttachment(screenshot: app.screenshot()) + attachment.name = "Launch Screen" + attachment.lifetime = .keepAlways + add(attachment) + } +} diff --git a/MyUIKit/MyUIKit.xcodeproj/project.pbxproj b/MyUIKit/MyUIKit.xcodeproj/project.pbxproj new file mode 100644 index 0000000..ae9e04e --- /dev/null +++ b/MyUIKit/MyUIKit.xcodeproj/project.pbxproj @@ -0,0 +1,619 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + 56DE2941296AB932005F0587 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56DE2940296AB932005F0587 /* AppDelegate.swift */; }; + 56DE2943296AB932005F0587 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56DE2942296AB932005F0587 /* SceneDelegate.swift */; }; + 56DE2945296AB932005F0587 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56DE2944296AB932005F0587 /* ViewController.swift */; }; + 56DE2948296AB932005F0587 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 56DE2946296AB932005F0587 /* Main.storyboard */; }; + 56DE294A296AB934005F0587 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 56DE2949296AB934005F0587 /* Assets.xcassets */; }; + 56DE294D296AB934005F0587 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 56DE294B296AB934005F0587 /* LaunchScreen.storyboard */; }; + 56DE2958296AB934005F0587 /* MyUIKitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56DE2957296AB934005F0587 /* MyUIKitTests.swift */; }; + 56DE2962296AB934005F0587 /* MyUIKitUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56DE2961296AB934005F0587 /* MyUIKitUITests.swift */; }; + 56DE2964296AB934005F0587 /* MyUIKitUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56DE2963296AB934005F0587 /* MyUIKitUITestsLaunchTests.swift */; }; + 56F2C1A1296B18D30063247C /* MyTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 56F2C1A0296B18D30063247C /* MyTableViewCell.xib */; }; + 56F2C1A3296B1F8F0063247C /* MyTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56F2C1A2296B1F8F0063247C /* MyTableViewCell.swift */; }; + 56F2C1A5296B3BEB0063247C /* CircleButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56F2C1A4296B3BEB0063247C /* CircleButton.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 56DE2954296AB934005F0587 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 56DE2935296AB932005F0587 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 56DE293C296AB932005F0587; + remoteInfo = MyUIKit; + }; + 56DE295E296AB934005F0587 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 56DE2935296AB932005F0587 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 56DE293C296AB932005F0587; + remoteInfo = MyUIKit; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 56DE293D296AB932005F0587 /* MyUIKit.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MyUIKit.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 56DE2940296AB932005F0587 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 56DE2942296AB932005F0587 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; + 56DE2944296AB932005F0587 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 56DE2947296AB932005F0587 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 56DE2949296AB934005F0587 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 56DE294C296AB934005F0587 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 56DE294E296AB934005F0587 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 56DE2953296AB934005F0587 /* MyUIKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MyUIKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 56DE2957296AB934005F0587 /* MyUIKitTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyUIKitTests.swift; sourceTree = ""; }; + 56DE295D296AB934005F0587 /* MyUIKitUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MyUIKitUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 56DE2961296AB934005F0587 /* MyUIKitUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyUIKitUITests.swift; sourceTree = ""; }; + 56DE2963296AB934005F0587 /* MyUIKitUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyUIKitUITestsLaunchTests.swift; sourceTree = ""; }; + 56F2C1A0296B18D30063247C /* MyTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MyTableViewCell.xib; sourceTree = ""; }; + 56F2C1A2296B1F8F0063247C /* MyTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = MyTableViewCell.swift; path = ../../../../Documents/MyTableViewCell.swift; sourceTree = ""; }; + 56F2C1A4296B3BEB0063247C /* CircleButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircleButton.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 56DE293A296AB932005F0587 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 56DE2950296AB934005F0587 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 56DE295A296AB934005F0587 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 56DE2934296AB932005F0587 = { + isa = PBXGroup; + children = ( + 56DE293F296AB932005F0587 /* MyUIKit */, + 56DE2956296AB934005F0587 /* MyUIKitTests */, + 56DE2960296AB934005F0587 /* MyUIKitUITests */, + 56DE293E296AB932005F0587 /* Products */, + ); + sourceTree = ""; + }; + 56DE293E296AB932005F0587 /* Products */ = { + isa = PBXGroup; + children = ( + 56DE293D296AB932005F0587 /* MyUIKit.app */, + 56DE2953296AB934005F0587 /* MyUIKitTests.xctest */, + 56DE295D296AB934005F0587 /* MyUIKitUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 56DE293F296AB932005F0587 /* MyUIKit */ = { + isa = PBXGroup; + children = ( + 56DE2940296AB932005F0587 /* AppDelegate.swift */, + 56DE2942296AB932005F0587 /* SceneDelegate.swift */, + 56DE2944296AB932005F0587 /* ViewController.swift */, + 56DE2946296AB932005F0587 /* Main.storyboard */, + 56F2C1A4296B3BEB0063247C /* CircleButton.swift */, + 56F2C1A2296B1F8F0063247C /* MyTableViewCell.swift */, + 56F2C1A0296B18D30063247C /* MyTableViewCell.xib */, + 56DE2949296AB934005F0587 /* Assets.xcassets */, + 56DE294B296AB934005F0587 /* LaunchScreen.storyboard */, + 56DE294E296AB934005F0587 /* Info.plist */, + ); + path = MyUIKit; + sourceTree = ""; + }; + 56DE2956296AB934005F0587 /* MyUIKitTests */ = { + isa = PBXGroup; + children = ( + 56DE2957296AB934005F0587 /* MyUIKitTests.swift */, + ); + path = MyUIKitTests; + sourceTree = ""; + }; + 56DE2960296AB934005F0587 /* MyUIKitUITests */ = { + isa = PBXGroup; + children = ( + 56DE2961296AB934005F0587 /* MyUIKitUITests.swift */, + 56DE2963296AB934005F0587 /* MyUIKitUITestsLaunchTests.swift */, + ); + path = MyUIKitUITests; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 56DE293C296AB932005F0587 /* MyUIKit */ = { + isa = PBXNativeTarget; + buildConfigurationList = 56DE2967296AB934005F0587 /* Build configuration list for PBXNativeTarget "MyUIKit" */; + buildPhases = ( + 56DE2939296AB932005F0587 /* Sources */, + 56DE293A296AB932005F0587 /* Frameworks */, + 56DE293B296AB932005F0587 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = MyUIKit; + productName = MyUIKit; + productReference = 56DE293D296AB932005F0587 /* MyUIKit.app */; + productType = "com.apple.product-type.application"; + }; + 56DE2952296AB934005F0587 /* MyUIKitTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 56DE296A296AB934005F0587 /* Build configuration list for PBXNativeTarget "MyUIKitTests" */; + buildPhases = ( + 56DE294F296AB934005F0587 /* Sources */, + 56DE2950296AB934005F0587 /* Frameworks */, + 56DE2951296AB934005F0587 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 56DE2955296AB934005F0587 /* PBXTargetDependency */, + ); + name = MyUIKitTests; + productName = MyUIKitTests; + productReference = 56DE2953296AB934005F0587 /* MyUIKitTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 56DE295C296AB934005F0587 /* MyUIKitUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 56DE296D296AB934005F0587 /* Build configuration list for PBXNativeTarget "MyUIKitUITests" */; + buildPhases = ( + 56DE2959296AB934005F0587 /* Sources */, + 56DE295A296AB934005F0587 /* Frameworks */, + 56DE295B296AB934005F0587 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 56DE295F296AB934005F0587 /* PBXTargetDependency */, + ); + name = MyUIKitUITests; + productName = MyUIKitUITests; + productReference = 56DE295D296AB934005F0587 /* MyUIKitUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 56DE2935296AB932005F0587 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1420; + LastUpgradeCheck = 1420; + TargetAttributes = { + 56DE293C296AB932005F0587 = { + CreatedOnToolsVersion = 14.2; + }; + 56DE2952296AB934005F0587 = { + CreatedOnToolsVersion = 14.2; + TestTargetID = 56DE293C296AB932005F0587; + }; + 56DE295C296AB934005F0587 = { + CreatedOnToolsVersion = 14.2; + TestTargetID = 56DE293C296AB932005F0587; + }; + }; + }; + buildConfigurationList = 56DE2938296AB932005F0587 /* Build configuration list for PBXProject "MyUIKit" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 56DE2934296AB932005F0587; + productRefGroup = 56DE293E296AB932005F0587 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 56DE293C296AB932005F0587 /* MyUIKit */, + 56DE2952296AB934005F0587 /* MyUIKitTests */, + 56DE295C296AB934005F0587 /* MyUIKitUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 56DE293B296AB932005F0587 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 56DE294D296AB934005F0587 /* LaunchScreen.storyboard in Resources */, + 56F2C1A1296B18D30063247C /* MyTableViewCell.xib in Resources */, + 56DE294A296AB934005F0587 /* Assets.xcassets in Resources */, + 56DE2948296AB932005F0587 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 56DE2951296AB934005F0587 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 56DE295B296AB934005F0587 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 56DE2939296AB932005F0587 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 56F2C1A5296B3BEB0063247C /* CircleButton.swift in Sources */, + 56DE2945296AB932005F0587 /* ViewController.swift in Sources */, + 56F2C1A3296B1F8F0063247C /* MyTableViewCell.swift in Sources */, + 56DE2941296AB932005F0587 /* AppDelegate.swift in Sources */, + 56DE2943296AB932005F0587 /* SceneDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 56DE294F296AB934005F0587 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 56DE2958296AB934005F0587 /* MyUIKitTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 56DE2959296AB934005F0587 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 56DE2962296AB934005F0587 /* MyUIKitUITests.swift in Sources */, + 56DE2964296AB934005F0587 /* MyUIKitUITestsLaunchTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 56DE2955296AB934005F0587 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 56DE293C296AB932005F0587 /* MyUIKit */; + targetProxy = 56DE2954296AB934005F0587 /* PBXContainerItemProxy */; + }; + 56DE295F296AB934005F0587 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 56DE293C296AB932005F0587 /* MyUIKit */; + targetProxy = 56DE295E296AB934005F0587 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 56DE2946296AB932005F0587 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 56DE2947296AB932005F0587 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 56DE294B296AB934005F0587 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 56DE294C296AB934005F0587 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 56DE2965296AB934005F0587 /* 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; + }; + 56DE2966296AB934005F0587 /* 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; + }; + 56DE2968296AB934005F0587 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = LVBHWHTSNF; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = MyUIKit/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.lee.MyUIKit; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 56DE2969296AB934005F0587 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = LVBHWHTSNF; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = MyUIKit/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.lee.MyUIKit; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 56DE296B296AB934005F0587 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = LVBHWHTSNF; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.2; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.lee.MyUIKitTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MyUIKit.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/MyUIKit"; + }; + name = Debug; + }; + 56DE296C296AB934005F0587 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = LVBHWHTSNF; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.2; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.lee.MyUIKitTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MyUIKit.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/MyUIKit"; + }; + name = Release; + }; + 56DE296E296AB934005F0587 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = LVBHWHTSNF; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.lee.MyUIKitUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = MyUIKit; + }; + name = Debug; + }; + 56DE296F296AB934005F0587 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = LVBHWHTSNF; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.lee.MyUIKitUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = MyUIKit; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 56DE2938296AB932005F0587 /* Build configuration list for PBXProject "MyUIKit" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 56DE2965296AB934005F0587 /* Debug */, + 56DE2966296AB934005F0587 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 56DE2967296AB934005F0587 /* Build configuration list for PBXNativeTarget "MyUIKit" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 56DE2968296AB934005F0587 /* Debug */, + 56DE2969296AB934005F0587 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 56DE296A296AB934005F0587 /* Build configuration list for PBXNativeTarget "MyUIKitTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 56DE296B296AB934005F0587 /* Debug */, + 56DE296C296AB934005F0587 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 56DE296D296AB934005F0587 /* Build configuration list for PBXNativeTarget "MyUIKitUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 56DE296E296AB934005F0587 /* Debug */, + 56DE296F296AB934005F0587 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 56DE2935296AB932005F0587 /* Project object */; +} diff --git a/MyUIKit/MyUIKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/MyUIKit/MyUIKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/MyUIKit/MyUIKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/MyUIKit/MyUIKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/MyUIKit/MyUIKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/MyUIKit/MyUIKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/MyUIKit/MyUIKit.xcodeproj/project.xcworkspace/xcuserdata/jihee.xcuserdatad/UserInterfaceState.xcuserstate b/MyUIKit/MyUIKit.xcodeproj/project.xcworkspace/xcuserdata/jihee.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..c56de47 Binary files /dev/null and b/MyUIKit/MyUIKit.xcodeproj/project.xcworkspace/xcuserdata/jihee.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/MyUIKit/MyUIKit.xcodeproj/xcuserdata/jihee.xcuserdatad/xcschemes/xcschememanagement.plist b/MyUIKit/MyUIKit.xcodeproj/xcuserdata/jihee.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..5a29553 --- /dev/null +++ b/MyUIKit/MyUIKit.xcodeproj/xcuserdata/jihee.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + MyUIKit.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/MyUIKit/MyUIKit/AppDelegate.swift b/MyUIKit/MyUIKit/AppDelegate.swift new file mode 100644 index 0000000..d4247b0 --- /dev/null +++ b/MyUIKit/MyUIKit/AppDelegate.swift @@ -0,0 +1,36 @@ +// +// AppDelegate.swift +// MyUIKit +// +// Created by 이지희 on 2023/01/08. +// + +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/MyUIKit/MyUIKit/Assets.xcassets/AccentColor.colorset/Contents.json b/MyUIKit/MyUIKit/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/MyUIKit/MyUIKit/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MyUIKit/MyUIKit/Assets.xcassets/AppIcon.appiconset/Contents.json b/MyUIKit/MyUIKit/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/MyUIKit/MyUIKit/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/MyUIKit/MyUIKit/Assets.xcassets/Contents.json b/MyUIKit/MyUIKit/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/MyUIKit/MyUIKit/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MyUIKit/MyUIKit/Base.lproj/LaunchScreen.storyboard b/MyUIKit/MyUIKit/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/MyUIKit/MyUIKit/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MyUIKit/MyUIKit/Base.lproj/Main.storyboard b/MyUIKit/MyUIKit/Base.lproj/Main.storyboard new file mode 100644 index 0000000..9076422 --- /dev/null +++ b/MyUIKit/MyUIKit/Base.lproj/Main.storyboard @@ -0,0 +1,599 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MyUIKit/MyUIKit/CircleButton.swift b/MyUIKit/MyUIKit/CircleButton.swift new file mode 100644 index 0000000..3d07c3a --- /dev/null +++ b/MyUIKit/MyUIKit/CircleButton.swift @@ -0,0 +1,20 @@ +// +// CircleButton.swift +// MyUIKit +// +// Created by 이지희 on 2023/01/09. +// + +import Foundation +import UIKit + +@IBDesignable +class CircleButton: UIButton{ + + @IBInspectable var cornerRadius: CGFloat = 0{ + didSet{ + layer.cornerRadius = cornerRadius + layer.masksToBounds = cornerRadius > 0 + } + } +} diff --git a/MyUIKit/MyUIKit/Info.plist b/MyUIKit/MyUIKit/Info.plist new file mode 100644 index 0000000..dd3c9af --- /dev/null +++ b/MyUIKit/MyUIKit/Info.plist @@ -0,0 +1,25 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + UISceneStoryboardFile + Main + + + + + + diff --git a/MyUIKit/MyUIKit/MyTableViewCell.swift b/MyUIKit/MyUIKit/MyTableViewCell.swift new file mode 100644 index 0000000..49b25e6 --- /dev/null +++ b/MyUIKit/MyUIKit/MyTableViewCell.swift @@ -0,0 +1,29 @@ +// +// MyTableViewCell.swift +// MyUIKit +// +// Created by 이지희 on 2023/01/09. +// + +import UIKit + +class MyTableViewCell: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + } + + + /* + // MARK: - Navigation + + // In a storyboard-based application, you will often want to do a little preparation before navigation + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + // Get the new view controller using segue.destination. + // Pass the selected object to the new view controller. + } + */ + +} diff --git a/MyUIKit/MyUIKit/MyTableViewCell.xib b/MyUIKit/MyUIKit/MyTableViewCell.xib new file mode 100644 index 0000000..fd7989b --- /dev/null +++ b/MyUIKit/MyUIKit/MyTableViewCell.xib @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MyUIKit/MyUIKit/SceneDelegate.swift b/MyUIKit/MyUIKit/SceneDelegate.swift new file mode 100644 index 0000000..e8ef097 --- /dev/null +++ b/MyUIKit/MyUIKit/SceneDelegate.swift @@ -0,0 +1,52 @@ +// +// SceneDelegate.swift +// MyUIKit +// +// Created by 이지희 on 2023/01/08. +// + +import UIKit + +class SceneDelegate: UIResponder, UIWindowSceneDelegate { + + var window: UIWindow? + + + func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { + // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. + // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. + // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). + guard let _ = (scene as? UIWindowScene) else { return } + } + + func sceneDidDisconnect(_ scene: UIScene) { + // Called as the scene is being released by the system. + // This occurs shortly after the scene enters the background, or when its session is discarded. + // Release any resources associated with this scene that can be re-created the next time the scene connects. + // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead). + } + + func sceneDidBecomeActive(_ scene: UIScene) { + // Called when the scene has moved from an inactive state to an active state. + // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. + } + + func sceneWillResignActive(_ scene: UIScene) { + // Called when the scene will move from an active state to an inactive state. + // This may occur due to temporary interruptions (ex. an incoming phone call). + } + + func sceneWillEnterForeground(_ scene: UIScene) { + // Called as the scene transitions from the background to the foreground. + // Use this method to undo the changes made on entering the background. + } + + func sceneDidEnterBackground(_ scene: UIScene) { + // Called as the scene transitions from the foreground to the background. + // Use this method to save data, release shared resources, and store enough scene-specific state information + // to restore the scene back to its current state. + } + + +} + diff --git a/MyUIKit/MyUIKit/ViewController.swift b/MyUIKit/MyUIKit/ViewController.swift new file mode 100644 index 0000000..4cd6849 --- /dev/null +++ b/MyUIKit/MyUIKit/ViewController.swift @@ -0,0 +1,156 @@ +// +// ViewController.swift +// MyUIKit +// +// Created by 이지희 on 2023/01/08. +// + +import UIKit +import Combine + +class ViewController: UIViewController { + + +// @IBOutlet weak var myTableView: UITableView! +// +// @IBOutlet var prependButton: UIBarButtonItem! +// @IBOutlet var resetButton: UIBarButtonItem! +// @IBOutlet var appendButton: UIBarButtonItem! + + var viewModel: ViewModel = ViewModel() + + var disposalbleBag = Set() + + var tempArray : [String] = [] +// var tempArray : [String] = [String]() + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view. + + // 쎌 리소스 파일 가져오기 + let myTableViewCellNib = UINib(nibName: String(describing: MyTableViewCell.self), bundle: nil) + + // 쏄에 리소스 등록 + self.myTableView.register(myTableViewCellNib, forCellReuseIdentifier: "myTableViewCellId") + + self.myTableView.rowHeight = UITableView.automaticDimension + self.myTableView.estimatedRowHeight = 120 + + // 아주 중요 + self.myTableView.delegate = self + self.myTableView.dataSource = self + + + // 뷰모델의 데이터 상태를 연동시킨다 + self.setBindings() + } + + + @IBAction func barButtonAction(_ sender: UIBarButtonItem) { + print(#function, #line, "") + switch sender { + case prependButton: + print("앞에 추가 버튼 클릭!") + self.viewModel.prependData() + case resetButton: + print("데이터 리셋 버튼 클릭!") + self.viewModel.resetData() + case appendButton: + print("뒤에 추가 버튼 클릭!") + self.viewModel.appendData() + default: break + } + } + +} // ViewController +//MARK: - 테이블뷰 관련 메소드 +extension ViewController { + +} + +//MARK: - 뷰모델 관련 +extension ViewController { + + /// 뷰모델의 데이터를 뷰컨의 리스트 데이터와 연동 + fileprivate func setBindings(){ + print("ViewController - setBindings()") + + // list 에 대한 바인딩 + self.viewModel.$tempArray.sink{ (updatedList : [String]) in + print("ViewController - updatedList.count: \(updatedList.count)") + self.tempArray = updatedList +// self.myTableView.reloadData() + }.store(in: &disposalbleBag) + + // action에 대한 바인딩 + self.viewModel.dataUpdatedAction.sink{ (addingType : ViewModel.AddingType) in + print("ViewController - dataUpdatedAction: \(addingType)") + switch addingType{ +// case .append, .reset: +// self.myTableView.reloadData() + case .prepend: + self.myTableView.reloadDataAndKeepOffset() + default: + self.myTableView.reloadData() + } + }.store(in: &disposalbleBag) + + self.viewModel.arrayCount.sink { arrayCount in + print("ViewController - arrayCount: \(arrayCount)") + self.navigationItem.title = "배열갯수: \(arrayCount)" + }.store(in: &disposalbleBag) + + } + + + +} + +//MARK: - UITableViewDelegate 관련 메소드 +extension ViewController: UITableViewDelegate { + +} + +//MARK: - UITableViewDataSource 관련 메소드 +extension ViewController: UITableViewDataSource { + + // 테이블 뷰 쎌의 갯수 + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return self.tempArray.count + } + + // 각 쎌에 대한 설정 + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + + let cell = myTableView.dequeueReusableCell(withIdentifier: "myTableViewCellId", for: indexPath) as! MyTableViewCell + + cell.userContentLabel.text = tempArray[indexPath.row] + + return cell + + } +} + +extension UITableView { + func reloadDataAndKeepOffset() { + // 스크롤링 멈추기 + setContentOffset(contentOffset, animated: false) + + // 데이터 추가전 컨텐트 사이즈 + let beforeContentSize = contentSize + reloadData() + layoutIfNeeded() + + // 데이터 추가후 커텐트 사이즈 + let afterContentSize = contentSize + + // 데이터가 변경되고 리로드 되고 나서 컨텐트 옵셋 계산 + let calculatedNewOffset = CGPoint( + x: contentOffset.x + (afterContentSize.width - beforeContentSize.width), + y: contentOffset.y + (afterContentSize.height - beforeContentSize.height) + ) + + // 변경된 옵셋 설정 + setContentOffset(calculatedNewOffset, animated: false) + } +} diff --git a/MyUIKit/MyUIKitTests/MyUIKitTests.swift b/MyUIKit/MyUIKitTests/MyUIKitTests.swift new file mode 100644 index 0000000..4ddf09d --- /dev/null +++ b/MyUIKit/MyUIKitTests/MyUIKitTests.swift @@ -0,0 +1,36 @@ +// +// MyUIKitTests.swift +// MyUIKitTests +// +// Created by 이지희 on 2023/01/08. +// + +import XCTest +@testable import MyUIKit + +final class MyUIKitTests: XCTestCase { + + override func setUpWithError() throws { + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDownWithError() throws { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() throws { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + // Any test you write for XCTest can be annotated as throws and async. + // Mark your test throws to produce an unexpected failure when your test encounters an uncaught error. + // Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards. + } + + func testPerformanceExample() throws { + // This is an example of a performance test case. + self.measure { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/MyUIKit/MyUIKitUITests/MyUIKitUITests.swift b/MyUIKit/MyUIKitUITests/MyUIKitUITests.swift new file mode 100644 index 0000000..4314f5e --- /dev/null +++ b/MyUIKit/MyUIKitUITests/MyUIKitUITests.swift @@ -0,0 +1,41 @@ +// +// MyUIKitUITests.swift +// MyUIKitUITests +// +// Created by 이지희 on 2023/01/08. +// + +import XCTest + +final class MyUIKitUITests: XCTestCase { + + override func setUpWithError() throws { + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + continueAfterFailure = false + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. + } + + override func tearDownWithError() throws { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() throws { + // UI tests must launch the application that they test. + let app = XCUIApplication() + app.launch() + + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testLaunchPerformance() throws { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) { + // This measures how long it takes to launch your application. + measure(metrics: [XCTApplicationLaunchMetric()]) { + XCUIApplication().launch() + } + } + } +} diff --git a/MyUIKit/MyUIKitUITests/MyUIKitUITestsLaunchTests.swift b/MyUIKit/MyUIKitUITests/MyUIKitUITestsLaunchTests.swift new file mode 100644 index 0000000..8945cfd --- /dev/null +++ b/MyUIKit/MyUIKitUITests/MyUIKitUITestsLaunchTests.swift @@ -0,0 +1,32 @@ +// +// MyUIKitUITestsLaunchTests.swift +// MyUIKitUITests +// +// Created by 이지희 on 2023/01/08. +// + +import XCTest + +final class MyUIKitUITestsLaunchTests: XCTestCase { + + override class var runsForEachTargetApplicationUIConfiguration: Bool { + true + } + + override func setUpWithError() throws { + continueAfterFailure = false + } + + func testLaunch() throws { + let app = XCUIApplication() + app.launch() + + // Insert steps here to perform after app launch but before taking a screenshot, + // such as logging into a test account or navigating somewhere in the app + + let attachment = XCTAttachment(screenshot: app.screenshot()) + attachment.name = "Launch Screen" + attachment.lifetime = .keepAlways + add(attachment) + } +} diff --git a/swiftTour.playground/Contents.swift b/swiftTour.playground/Contents.swift new file mode 100644 index 0000000..9cf034e --- /dev/null +++ b/swiftTour.playground/Contents.swift @@ -0,0 +1,125 @@ +//let apples = 3 +//let appleSummary = "I have \(apples) apples." +//let appleString = """ +//"\(apples) apples!!!" +//""" + +//var fruits = ["strawberries", "limes", "tangerines"] +//fruits[1] = "grapes" +// +//var occupations = [ +// "Malcolm": "Captain", +// "Kaylee": "Mechanic", +//] +//occupations["Jayne"] = "Public Relations" +// +//print(fruits) +//print(occupations) +// +//var optionalName: String? = "lee" +//var greeting: String +//if let name = optionalName { +// greeting = "Hello, \(name)" +//} else { +// greeting = "Hello!" +//} +//print(greeting) + +//var optionalName: String? = "lee" +//var defaultName: String = "default" +//let greeting = "Hello, \(optionalName ?? defaultName)" +//if let name = optionalName {"Hello, \(name ?? defaultName)"} + +//var name: String? = "lee" +//var greeting = "Hello!" +//if let name {greeting = "Hello, \(name)"} + +//let vegetable = "red pepper" +//switch vegetable { +//case "celery": +// print("Add some raisins and make ants on a log.") +//case "cucumber", "watercress": +// print("That would make a good tea sandwich.") +//case let x where x.hasSuffix("pepper"): +// print("Is it a spicy \(x)?") +//default: +// print("Everything tastes good in soup.") +//} +// Prints "Is it a spicy red pepper?" + +//let interestingNumbers = [ +// "apple": [1,2,3,4,5], +// "banana": [6,7,8,9,10], +// "cherry": [11,12,13,14,15], +//] +//for (key, values) in interestingNumbers { +// for value in values { +// print(key, value) +// } +//} + +//var n = 2 +//while n < 2 { +// n *= 2 +//} +//print(n) //2 +// +// +//var m = 2 +//repeat { +// m *= 2 +//} while m < 2 +//print(m) //4 + +//func greet(_ person: String, WhatDay day: String) -> String { +// return "Hello \(person), today is \(day)." +//} +//greet("John", WhatDay: "Wednesday") + +//func calculateStatistics(scores: [Int]) -> (min: Int, max: Int, sum: Int) { +// var min = scores[0] +// var max = scores[0] +// var sum = 0 +// +// for score in scores { +// if score > max { +// max = score +// } else if score < min { +// min = score +// } +// sum += score +// } +// +// return (min, max, sum) +//} +//let statistics = calculateStatistics(scores: [5, 3, 100, 3, 9]) +//// (min 3, max 100, sum 120) + +//func returnFifteen() -> Int { +// var y = 10 +// func add() { y += 5 } +// add() //15 +// return y //15 +//} + +//func makeIncrementer() -> ((Int) -> Int) { +// func addOne(number: Int) -> Int { return 1 + number } +// return addOne +//} +//var increment = makeIncrementer() +//increment(7) //8 +// + +func hasAnyMatches(list: [Int], condition: (Int) -> Bool) -> Bool { + for item in list { + if condition(item) { + return true + } + } + return false +} +func lessThanTen(number: Int) -> Bool { + return number < 10 +} +var numbers = [20, 19, 7, 12] +hasAnyMatches(list: numbers, condition: lessThanTen) diff --git a/swiftTour.playground/contents.xcplayground b/swiftTour.playground/contents.xcplayground new file mode 100644 index 0000000..cf026f2 --- /dev/null +++ b/swiftTour.playground/contents.xcplayground @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/swiftTour.playground/playground.xcworkspace/contents.xcworkspacedata b/swiftTour.playground/playground.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..ca3329e --- /dev/null +++ b/swiftTour.playground/playground.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/swiftTour.playground/playground.xcworkspace/xcuserdata/jihee.xcuserdatad/UserInterfaceState.xcuserstate b/swiftTour.playground/playground.xcworkspace/xcuserdata/jihee.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..a851c0f Binary files /dev/null and b/swiftTour.playground/playground.xcworkspace/xcuserdata/jihee.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/week3/.DS_Store b/week3/.DS_Store index 6d7074e..3c3b4a2 100644 Binary files a/week3/.DS_Store and b/week3/.DS_Store differ diff --git a/week3/week3.xcodeproj/project.pbxproj b/week3/week3.xcodeproj/project.pbxproj index 15d0337..e68efe5 100644 --- a/week3/week3.xcodeproj/project.pbxproj +++ b/week3/week3.xcodeproj/project.pbxproj @@ -106,11 +106,7 @@ children = ( 5649135E292617A400523E17 /* week3App.swift */, 56491360292617A400523E17 /* ContentView.swift */, - 563C34092929DA4900CE9035 /* stateTest.swift */, - 5649138A292621FF00523E17 /* colorTest.swift */, - 563C34072929DA0000CE9035 /* viewTest.swift */, - 563C340B2929E56600CE9035 /* paddingTest.swift */, - 563C340D2929E98300CE9035 /* total.swift */, + 56C250752935EC5C004EB9A1 /* group */, 56491362292617A500523E17 /* Assets.xcassets */, 56491364292617A500523E17 /* Preview Content */, ); @@ -142,6 +138,18 @@ path = week3UITests; sourceTree = ""; }; + 56C250752935EC5C004EB9A1 /* group */ = { + isa = PBXGroup; + children = ( + 563C34092929DA4900CE9035 /* stateTest.swift */, + 5649138A292621FF00523E17 /* colorTest.swift */, + 563C34072929DA0000CE9035 /* viewTest.swift */, + 563C340B2929E56600CE9035 /* paddingTest.swift */, + 563C340D2929E98300CE9035 /* total.swift */, + ); + path = group; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ diff --git a/week3/week3.xcodeproj/project.xcworkspace/xcuserdata/jihee.xcuserdatad/UserInterfaceState.xcuserstate b/week3/week3.xcodeproj/project.xcworkspace/xcuserdata/jihee.xcuserdatad/UserInterfaceState.xcuserstate index 9d0d998..caa729f 100644 Binary files a/week3/week3.xcodeproj/project.xcworkspace/xcuserdata/jihee.xcuserdatad/UserInterfaceState.xcuserstate and b/week3/week3.xcodeproj/project.xcworkspace/xcuserdata/jihee.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/week3/week3/.DS_Store b/week3/week3/.DS_Store new file mode 100644 index 0000000..c6d75e1 Binary files /dev/null and b/week3/week3/.DS_Store differ diff --git a/week3/week3/colorTest.swift b/week3/week3/group/colorTest.swift similarity index 88% rename from week3/week3/colorTest.swift rename to week3/week3/group/colorTest.swift index af03bdd..6eef66d 100644 --- a/week3/week3/colorTest.swift +++ b/week3/week3/group/colorTest.swift @@ -7,7 +7,7 @@ import SwiftUI -struct SwiftUIView: View { +struct colorTest: View { var body: some View { Color(.orange) .clipShape(Circle()) @@ -17,6 +17,6 @@ struct SwiftUIView: View { struct SwiftUIView_Previews: PreviewProvider { static var previews: some View { - SwiftUIView() + colorTest() } } diff --git a/week3/week3/paddingTest.swift b/week3/week3/group/paddingTest.swift similarity index 100% rename from week3/week3/paddingTest.swift rename to week3/week3/group/paddingTest.swift diff --git a/week3/week3/stateTest.swift b/week3/week3/group/stateTest.swift similarity index 100% rename from week3/week3/stateTest.swift rename to week3/week3/group/stateTest.swift diff --git a/week3/week3/total.swift b/week3/week3/group/total.swift similarity index 100% rename from week3/week3/total.swift rename to week3/week3/group/total.swift diff --git a/week3/week3/viewTest.swift b/week3/week3/group/viewTest.swift similarity index 100% rename from week3/week3/viewTest.swift rename to week3/week3/group/viewTest.swift diff --git a/week4/.DS_Store b/week4/.DS_Store new file mode 100644 index 0000000..a30dcaa Binary files /dev/null and b/week4/.DS_Store differ diff --git a/week4/week4.xcodeproj/project.xcworkspace/xcuserdata/jihee.xcuserdatad/UserInterfaceState.xcuserstate b/week4/week4.xcodeproj/project.xcworkspace/xcuserdata/jihee.xcuserdatad/UserInterfaceState.xcuserstate index ed8ac52..eac340c 100644 Binary files a/week4/week4.xcodeproj/project.xcworkspace/xcuserdata/jihee.xcuserdatad/UserInterfaceState.xcuserstate and b/week4/week4.xcodeproj/project.xcworkspace/xcuserdata/jihee.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/week4/week4/.DS_Store b/week4/week4/.DS_Store new file mode 100644 index 0000000..a7ef02a Binary files /dev/null and b/week4/week4/.DS_Store differ