diff --git a/Instagram/Instagram.xcodeproj/project.pbxproj b/Instagram/Instagram.xcodeproj/project.pbxproj new file mode 100644 index 0000000..c55bf7f --- /dev/null +++ b/Instagram/Instagram.xcodeproj/project.pbxproj @@ -0,0 +1,353 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + 906769082C09CDAC00E4A532 /* InstagramApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 906769072C09CDAC00E4A532 /* InstagramApp.swift */; }; + 9067690C2C09CDAD00E4A532 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9067690B2C09CDAD00E4A532 /* Assets.xcassets */; }; + 9067690F2C09CDAD00E4A532 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9067690E2C09CDAD00E4A532 /* Preview Assets.xcassets */; }; + 906769162C09CDD300E4A532 /* ChatView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 906769152C09CDD300E4A532 /* ChatView.swift */; }; + 906769182C09CE1700E4A532 /* DMView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 906769172C09CE1700E4A532 /* DMView.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 906769042C09CDAC00E4A532 /* Instagram.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Instagram.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 906769072C09CDAC00E4A532 /* InstagramApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InstagramApp.swift; sourceTree = ""; }; + 9067690B2C09CDAD00E4A532 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 9067690E2C09CDAD00E4A532 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + 906769152C09CDD300E4A532 /* ChatView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatView.swift; sourceTree = ""; }; + 906769172C09CE1700E4A532 /* DMView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DMView.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 906769012C09CDAC00E4A532 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 906768FB2C09CDAC00E4A532 = { + isa = PBXGroup; + children = ( + 906769062C09CDAC00E4A532 /* Instagram */, + 906769052C09CDAC00E4A532 /* Products */, + ); + sourceTree = ""; + }; + 906769052C09CDAC00E4A532 /* Products */ = { + isa = PBXGroup; + children = ( + 906769042C09CDAC00E4A532 /* Instagram.app */, + ); + name = Products; + sourceTree = ""; + }; + 906769062C09CDAC00E4A532 /* Instagram */ = { + isa = PBXGroup; + children = ( + 906769072C09CDAC00E4A532 /* InstagramApp.swift */, + 906769172C09CE1700E4A532 /* DMView.swift */, + 906769152C09CDD300E4A532 /* ChatView.swift */, + 9067690B2C09CDAD00E4A532 /* Assets.xcassets */, + 9067690D2C09CDAD00E4A532 /* Preview Content */, + ); + path = Instagram; + sourceTree = ""; + }; + 9067690D2C09CDAD00E4A532 /* Preview Content */ = { + isa = PBXGroup; + children = ( + 9067690E2C09CDAD00E4A532 /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 906769032C09CDAC00E4A532 /* Instagram */ = { + isa = PBXNativeTarget; + buildConfigurationList = 906769122C09CDAD00E4A532 /* Build configuration list for PBXNativeTarget "Instagram" */; + buildPhases = ( + 906769002C09CDAC00E4A532 /* Sources */, + 906769012C09CDAC00E4A532 /* Frameworks */, + 906769022C09CDAC00E4A532 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Instagram; + productName = Instagram; + productReference = 906769042C09CDAC00E4A532 /* Instagram.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 906768FC2C09CDAC00E4A532 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1540; + LastUpgradeCheck = 1540; + TargetAttributes = { + 906769032C09CDAC00E4A532 = { + CreatedOnToolsVersion = 15.4; + }; + }; + }; + buildConfigurationList = 906768FF2C09CDAC00E4A532 /* Build configuration list for PBXProject "Instagram" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 906768FB2C09CDAC00E4A532; + productRefGroup = 906769052C09CDAC00E4A532 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 906769032C09CDAC00E4A532 /* Instagram */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 906769022C09CDAC00E4A532 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 9067690F2C09CDAD00E4A532 /* Preview Assets.xcassets in Resources */, + 9067690C2C09CDAD00E4A532 /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 906769002C09CDAC00E4A532 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 906769162C09CDD300E4A532 /* ChatView.swift in Sources */, + 906769082C09CDAC00E4A532 /* InstagramApp.swift in Sources */, + 906769182C09CE1700E4A532 /* DMView.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 906769102C09CDAD00E4A532 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 17.5; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 906769112C09CDAD00E4A532 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 17.5; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 906769132C09CDAD00E4A532 /* 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 = "\"Instagram/Preview Content\""; + DEVELOPMENT_TEAM = MJ4X29XXL3; + 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 = dongdong.Instagram; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 906769142C09CDAD00E4A532 /* 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 = "\"Instagram/Preview Content\""; + DEVELOPMENT_TEAM = MJ4X29XXL3; + 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 = dongdong.Instagram; + 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 */ + 906768FF2C09CDAC00E4A532 /* Build configuration list for PBXProject "Instagram" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 906769102C09CDAD00E4A532 /* Debug */, + 906769112C09CDAD00E4A532 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 906769122C09CDAD00E4A532 /* Build configuration list for PBXNativeTarget "Instagram" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 906769132C09CDAD00E4A532 /* Debug */, + 906769142C09CDAD00E4A532 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 906768FC2C09CDAC00E4A532 /* Project object */; +} diff --git a/Instagram/Instagram.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Instagram/Instagram.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/Instagram/Instagram.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Instagram/Instagram.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Instagram/Instagram.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Instagram/Instagram.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Instagram/Instagram.xcodeproj/project.xcworkspace/xcuserdata/kimdongseob.xcuserdatad/UserInterfaceState.xcuserstate b/Instagram/Instagram.xcodeproj/project.xcworkspace/xcuserdata/kimdongseob.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..7bf2647 Binary files /dev/null and b/Instagram/Instagram.xcodeproj/project.xcworkspace/xcuserdata/kimdongseob.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Instagram/Instagram.xcodeproj/xcuserdata/kimdongseob.xcuserdatad/xcschemes/xcschememanagement.plist b/Instagram/Instagram.xcodeproj/xcuserdata/kimdongseob.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..59235a0 --- /dev/null +++ b/Instagram/Instagram.xcodeproj/xcuserdata/kimdongseob.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Instagram.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/Instagram/Instagram/Assets.xcassets/AccentColor.colorset/Contents.json b/Instagram/Instagram/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Instagram/Instagram/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Instagram/Instagram/Assets.xcassets/AppIcon.appiconset/Contents.json b/Instagram/Instagram/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Instagram/Instagram/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/Instagram/Instagram/Assets.xcassets/Contents.json b/Instagram/Instagram/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Instagram/Instagram/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Instagram/Instagram/Assets.xcassets/test1.imageset/Contents.json b/Instagram/Instagram/Assets.xcassets/test1.imageset/Contents.json new file mode 100644 index 0000000..86a9d2b --- /dev/null +++ b/Instagram/Instagram/Assets.xcassets/test1.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "test1.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Instagram/Instagram/Assets.xcassets/test1.imageset/test1.png b/Instagram/Instagram/Assets.xcassets/test1.imageset/test1.png new file mode 100644 index 0000000..ce79878 Binary files /dev/null and b/Instagram/Instagram/Assets.xcassets/test1.imageset/test1.png differ diff --git a/Instagram/Instagram/Assets.xcassets/test10.imageset/Contents.json b/Instagram/Instagram/Assets.xcassets/test10.imageset/Contents.json new file mode 100644 index 0000000..475bf64 --- /dev/null +++ b/Instagram/Instagram/Assets.xcassets/test10.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "test10.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Instagram/Instagram/Assets.xcassets/test10.imageset/test10.jpg b/Instagram/Instagram/Assets.xcassets/test10.imageset/test10.jpg new file mode 100644 index 0000000..a6ffd9b Binary files /dev/null and b/Instagram/Instagram/Assets.xcassets/test10.imageset/test10.jpg differ diff --git a/Instagram/Instagram/Assets.xcassets/test11.imageset/Contents.json b/Instagram/Instagram/Assets.xcassets/test11.imageset/Contents.json new file mode 100644 index 0000000..6176c38 --- /dev/null +++ b/Instagram/Instagram/Assets.xcassets/test11.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "test11.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Instagram/Instagram/Assets.xcassets/test11.imageset/test11.png b/Instagram/Instagram/Assets.xcassets/test11.imageset/test11.png new file mode 100644 index 0000000..1e02aca Binary files /dev/null and b/Instagram/Instagram/Assets.xcassets/test11.imageset/test11.png differ diff --git a/Instagram/Instagram/Assets.xcassets/test12.imageset/Contents.json b/Instagram/Instagram/Assets.xcassets/test12.imageset/Contents.json new file mode 100644 index 0000000..75df193 --- /dev/null +++ b/Instagram/Instagram/Assets.xcassets/test12.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "test12.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Instagram/Instagram/Assets.xcassets/test12.imageset/test12.jpg b/Instagram/Instagram/Assets.xcassets/test12.imageset/test12.jpg new file mode 100644 index 0000000..b8b0b46 Binary files /dev/null and b/Instagram/Instagram/Assets.xcassets/test12.imageset/test12.jpg differ diff --git a/Instagram/Instagram/Assets.xcassets/test2.imageset/Contents.json b/Instagram/Instagram/Assets.xcassets/test2.imageset/Contents.json new file mode 100644 index 0000000..68f9d66 --- /dev/null +++ b/Instagram/Instagram/Assets.xcassets/test2.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "test2.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Instagram/Instagram/Assets.xcassets/test2.imageset/test2.jpg b/Instagram/Instagram/Assets.xcassets/test2.imageset/test2.jpg new file mode 100644 index 0000000..15e97ea Binary files /dev/null and b/Instagram/Instagram/Assets.xcassets/test2.imageset/test2.jpg differ diff --git a/Instagram/Instagram/Assets.xcassets/test3.imageset/Contents.json b/Instagram/Instagram/Assets.xcassets/test3.imageset/Contents.json new file mode 100644 index 0000000..1aeb97a --- /dev/null +++ b/Instagram/Instagram/Assets.xcassets/test3.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "test3.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Instagram/Instagram/Assets.xcassets/test3.imageset/test3.png b/Instagram/Instagram/Assets.xcassets/test3.imageset/test3.png new file mode 100644 index 0000000..eecc104 Binary files /dev/null and b/Instagram/Instagram/Assets.xcassets/test3.imageset/test3.png differ diff --git a/Instagram/Instagram/Assets.xcassets/test4.imageset/Contents.json b/Instagram/Instagram/Assets.xcassets/test4.imageset/Contents.json new file mode 100644 index 0000000..add25f5 --- /dev/null +++ b/Instagram/Instagram/Assets.xcassets/test4.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "test4.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Instagram/Instagram/Assets.xcassets/test4.imageset/test4.jpg b/Instagram/Instagram/Assets.xcassets/test4.imageset/test4.jpg new file mode 100644 index 0000000..a229f34 Binary files /dev/null and b/Instagram/Instagram/Assets.xcassets/test4.imageset/test4.jpg differ diff --git a/Instagram/Instagram/Assets.xcassets/test5.imageset/Contents.json b/Instagram/Instagram/Assets.xcassets/test5.imageset/Contents.json new file mode 100644 index 0000000..11ccc68 --- /dev/null +++ b/Instagram/Instagram/Assets.xcassets/test5.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "test5.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Instagram/Instagram/Assets.xcassets/test5.imageset/test5.png b/Instagram/Instagram/Assets.xcassets/test5.imageset/test5.png new file mode 100644 index 0000000..e7e13c5 Binary files /dev/null and b/Instagram/Instagram/Assets.xcassets/test5.imageset/test5.png differ diff --git a/Instagram/Instagram/Assets.xcassets/test6.imageset/Contents.json b/Instagram/Instagram/Assets.xcassets/test6.imageset/Contents.json new file mode 100644 index 0000000..52e1673 --- /dev/null +++ b/Instagram/Instagram/Assets.xcassets/test6.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "test6.jpeg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Instagram/Instagram/Assets.xcassets/test6.imageset/test6.jpeg b/Instagram/Instagram/Assets.xcassets/test6.imageset/test6.jpeg new file mode 100644 index 0000000..1b50501 Binary files /dev/null and b/Instagram/Instagram/Assets.xcassets/test6.imageset/test6.jpeg differ diff --git a/Instagram/Instagram/Assets.xcassets/test7.imageset/Contents.json b/Instagram/Instagram/Assets.xcassets/test7.imageset/Contents.json new file mode 100644 index 0000000..bb77cc0 --- /dev/null +++ b/Instagram/Instagram/Assets.xcassets/test7.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "test7.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Instagram/Instagram/Assets.xcassets/test7.imageset/test7.jpg b/Instagram/Instagram/Assets.xcassets/test7.imageset/test7.jpg new file mode 100644 index 0000000..f1ac457 Binary files /dev/null and b/Instagram/Instagram/Assets.xcassets/test7.imageset/test7.jpg differ diff --git a/Instagram/Instagram/Assets.xcassets/test8.imageset/Contents.json b/Instagram/Instagram/Assets.xcassets/test8.imageset/Contents.json new file mode 100644 index 0000000..f1e5872 --- /dev/null +++ b/Instagram/Instagram/Assets.xcassets/test8.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "test8.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Instagram/Instagram/Assets.xcassets/test8.imageset/test8.jpg b/Instagram/Instagram/Assets.xcassets/test8.imageset/test8.jpg new file mode 100644 index 0000000..2e831f6 Binary files /dev/null and b/Instagram/Instagram/Assets.xcassets/test8.imageset/test8.jpg differ diff --git a/Instagram/Instagram/Assets.xcassets/test9.imageset/Contents.json b/Instagram/Instagram/Assets.xcassets/test9.imageset/Contents.json new file mode 100644 index 0000000..12053d3 --- /dev/null +++ b/Instagram/Instagram/Assets.xcassets/test9.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "test9.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Instagram/Instagram/Assets.xcassets/test9.imageset/test9.jpg b/Instagram/Instagram/Assets.xcassets/test9.imageset/test9.jpg new file mode 100644 index 0000000..13ed0ec Binary files /dev/null and b/Instagram/Instagram/Assets.xcassets/test9.imageset/test9.jpg differ diff --git a/Instagram/Instagram/ChatView.swift b/Instagram/Instagram/ChatView.swift new file mode 100644 index 0000000..b55d951 --- /dev/null +++ b/Instagram/Instagram/ChatView.swift @@ -0,0 +1,184 @@ +import SwiftUI + +// <<< 추가해야 할 기능>>> +// 각종 버튼들 액션 추가 +// + + +struct ChatView: View { + var body: some View { + NavigationView { + VStack(spacing: 0) { + ChatHeaderView() + ScrollView { + VStack(spacing: 10) { + MessageView(isCurrentUser: false, text: "롤 들어오셈 ㄱㄱ") + MessageView(isCurrentUser: true, text: "ㄱㄷㄱㄷ 나 밥만 먹고") + MessageView(isCurrentUser: false, text: "ㅇㅋㅇㅋ") + MessageView(isCurrentUser: true, text: "밥 다 먹음") + MessageView(isCurrentUser: true, text: "두가자~") + MessageView(isCurrentUser: false, text: "기릿") + TimestampView(timestamp: "(화) 오후 9:43") + MessageView(isCurrentUser: false, text: "헤이헤이") + MessageView(isCurrentUser: true, text: "와이와이") + TimestampView(timestamp: "(수) 오전 11:20") + MessageView(isCurrentUser: false, text: "수욜은 안됨??") + MessageView(isCurrentUser: false, text: "정현수 최윤후 수욜이 좋다고 그래가지고") + MessageView(isCurrentUser: false, text: "수욜은 프젝 바쁨??") + MessageView(isCurrentUser: true, text: "ㅇㅇ") + MessageView(isCurrentUser: true, text: "미정이긴 한데") + MessageView(isCurrentUser: true, text: "뭐 저녁이면 될듯 ㅇㅇ") + MessageView(isCurrentUser: true, text: "Maybe?") + MessageView(isCurrentUser: false, text: "ㅇㅋㅇ 바리바리수타") + TimestampView(timestamp: "(금) 오후 1:07") + MessageView(isCurrentUser: false, text: "내일 술 ㄱㄱ?") + } + .padding() + } + ChatInputView() + } + .navigationBarTitleDisplayMode(.inline) + .navigationBarHidden(true) + } + } +} + +struct ChatHeaderView: View { + var body: some View { + HStack { + Button(action: { + // Action for back button + }) { + Image(systemName: "chevron.left") + .foregroundColor(.black) + .padding(.leading, 16) + .font(.title2) + } + Image("test2") + .resizable() + .frame(width: 40, height: 40) + .clipShape(Circle()) + .padding(2) + .overlay( + Circle() + .stroke(Color.green, lineWidth: 2) + ) + .padding(.leading, 10) + + VStack(alignment: .leading) { + Text("박스윗") + .foregroundColor(.black) + .font(.headline) + Text("sweeeet_park") + .foregroundColor(.gray) + .font(.subheadline) + } + + Spacer() + + HStack(spacing: 20) { + Button(action: { + // Action for call button + }) { + Image(systemName: "phone") + .foregroundColor(.black) + .font(.title2) + } + + Button(action: { + // Action for video call button + }) { + Image(systemName: "video") + .foregroundColor(.black) + .font(.title2) + } + } + .padding(.trailing, 16) + } + .padding(.vertical, 10) + .background(Color.white) + Divider() + } +} + +struct MessageView: View { + var isCurrentUser: Bool + var text: String + + var body: some View { + HStack { + if !isCurrentUser { + Image("test2") + .resizable() + .frame(width: 40, height: 40) + .clipShape(Circle()) + } + + Text(text) + .padding(10) + .background(isCurrentUser ? Color.blue : Color.gray.opacity(0.2)) + .foregroundColor(isCurrentUser ? .white : .black) + .cornerRadius(10) + .frame(maxWidth: 250, alignment: isCurrentUser ? .trailing : .leading) + .padding(isCurrentUser ? .leading : .trailing, 50) + } + .padding(isCurrentUser ? .leading : .trailing, 16) + } +} + +struct TimestampView: View { + var timestamp: String + + var body: some View { + Text(timestamp) + .foregroundColor(.gray) + .font(.footnote) + .padding(.vertical, 5) + } +} + +struct ChatInputView: View { + @State private var messageText: String = "" + + var body: some View { + HStack { + Button(action: { + // Action for adding media + }) { + Image(systemName: "camera.circle.fill") + .font(.title) + } + + TextField("메시지 보내기...", text: $messageText) + .padding(10) + .background(Color.gray.opacity(0.2)) + .cornerRadius(20) + .foregroundColor(.black) + + Button(action: { + // Action for sending message + }) { + Image(systemName: "mic") + .foregroundColor(.black) + } + Button(action: { + // Action for sending message + }) { + Image(systemName: "photo") + .foregroundColor(.black) + } + Button(action: { + // Action for sending message + }) { + Image(systemName: "plus.bubble") + .foregroundColor(.black) + } + } + .padding() + .background(Color.white) + } +} + +#Preview { + ChatView() +} diff --git a/Instagram/Instagram/DMView.swift b/Instagram/Instagram/DMView.swift new file mode 100644 index 0000000..2c75e2a --- /dev/null +++ b/Instagram/Instagram/DMView.swift @@ -0,0 +1,277 @@ +import SwiftUI + +// <<< 추가해야 할 기능>>> +// 스토리 읽으면 회색으로 바뀌는 기능 -> 구조체 요소 재정립 필요? +// 사용자 검색 기능 +// 메모 기능 좀 더 완벽하게 구현 + +struct DMView: View { + var body: some View { + NavigationView { + VStack(spacing: 0) { + HeaderView() + MessageListView() + } + .navigationBarTitle("") + .navigationBarHidden(true) + .background(Color.white.edgesIgnoringSafeArea(.all)) + } + } +} + +struct HeaderView: View { + var body: some View { + HStack { + Image(systemName: "chevron.left") + .foregroundColor(.black) + .padding(.leading, 18) + .font(.system(size: 25)) + .fontWeight(.semibold) + + Text("ssub_2_") + .font(.title2) + .foregroundColor(.black) + .fontWeight(.bold) + .padding(.leading, 1) + + Image(systemName: "chevron.down") + .resizable() + .aspectRatio(contentMode: .fit) + .foregroundColor(.black) + .padding(.leading, 1) + .frame(width: 13, height: 13) + .bold() + + Spacer() + + Image(systemName: "square.and.pencil") + .foregroundColor(.black) + .padding(.trailing, 16) + .font(.title2) + .fontWeight(.semibold) + } + .padding(.vertical, 12) + } +} + +struct SearchBarView: View { + @State private var searchText = "" + + var body: some View { + HStack { + TextField("🔍 검색", text: $searchText) + .padding(8) + .background(Color.gray.opacity(0.2)) + .cornerRadius(8) + .foregroundColor(.black) + .padding(.horizontal, 16) + } + .padding(.bottom, 10) + } +} + +struct MessageListView: View { + var body: some View { + ScrollView { + VStack { + SearchBarView() + MemoView(memos: memos) + + HStack { + Text("메시지") + .font(.system(size: 18)) + .bold() + + Spacer() + + Text("요청") + .font(.headline) + .foregroundColor(.gray) + + } + .padding(.horizontal, 15) + .padding(.top, 10) + + ForEach(messages) { message in + MessageRowView(message: message) + } + } + .padding(.top, 8) + } + } +} + +struct MemoView: View { + + var memos: [Memo] + + var body: some View { + + ScrollView(.horizontal, showsIndicators: false) { + HStack(spacing: 10) { + ForEach(memos) { memo in + VStack { + Image(memo.imageName) + .resizable() + .frame(width: 70, height: 70) + .clipShape(Circle()) + .overlay( + Circle().stroke(Color.gray, lineWidth: 1) + ) + + VStack { + Text(memo.name) + .font(.subheadline) + .foregroundColor(.black) + .font(.body) + Text(memo.userMemo) + .bold() + .font(.subheadline) + } + .frame(width: 80) + } + } + } + .padding(.horizontal, 10) + } + } +} + +struct MessageRowView: View { + var message: Message + + var body: some View { + HStack { + + if message.storyOn { + if message.bf { + Image(message.imageName) + .resizable() + .frame(width: 60, height: 60) + .clipShape(Circle()) + .padding(2) + .overlay( + Circle() + .stroke(Color.green, lineWidth: 2) + ) + .padding(.leading, 16) + } + else { + Image(message.imageName) + .resizable() + .frame(width: 60, height: 60) + .clipShape(Circle()) + .padding(2) + .overlay( + Circle() + .stroke( + LinearGradient(gradient: Gradient(colors: [.pink, .purple]), startPoint: .topLeading, endPoint: .bottomTrailing), + lineWidth: 2 + ) + .padding(2) + ) + .padding(.leading, 16) + } + } + else { + Image(message.imageName) + .resizable() + .frame(width: 60, height: 60) + .clipShape(Circle()) + .padding(2) + .overlay( + Circle() + .stroke(Color.gray, lineWidth: 2) + .padding(2) + ) + .padding(.leading, 16) + } + + VStack(alignment: .leading) { + Text(message.name) + .foregroundColor(.black) + .font(.body) + .bold() + + if message.isRead { + Text(message.time) + .foregroundColor(.gray) + .font(.footnote) + } + + else { + HStack { + Text(message.talk) + .foregroundColor(.gray) + .font(.footnote) + .lineLimit(1) + .truncationMode(.tail) + + Text(message.time) + .foregroundColor(.gray) + .font(.footnote) + + } + } + } + .padding(.leading, 8) + + Spacer() + + Image(systemName: "camera") + .font(.system(size: 20)) + .foregroundColor(.gray) + .padding(.leading, 10) + .padding(.trailing, 16) + .bold() + } + .padding(.vertical, 8) + } +} + +struct Memo: Identifiable { + let id = UUID() + let imageName: String + let name: String + let userMemo: String +} + +struct Message: Identifiable { + let id = UUID() + let imageName: String + let storyOn: Bool + let bf: Bool + let name: String + let isRead: Bool + let talk: String + let time: String +} + +let memos = [ + Memo(imageName: "test9", name: "김장발", userMemo: "오늘 날씨 굿"), + Memo(imageName: "test11", name: "황보곰", userMemo: "졸리당"), + Memo(imageName: "test1", name: "정멍뭉", userMemo: "배고픈데?"), + Memo(imageName: "test8", name: "오간지", userMemo: "Hello"), + Memo(imageName: "test4", name: "김아요", userMemo: "아 뭐 먹지"), + Memo(imageName: "test5", name: "이치킨", userMemo: "심심하다...") +] + +let messages = [ + Message(imageName: "test1", storyOn: true, bf: false, name: "정멍뭉",isRead: false, talk: "야 밥 언제 먹을거야 · ", time: "16분"), + Message(imageName: "test2", storyOn: true, bf: true, name: "박스윗", isRead: false, talk: "내일 술 ㄱㄱ? · ", time: "14시간"), + Message(imageName: "test3", storyOn: false, bf: false, name: "남궁우주", isRead: true, talk: "", time: "화요일에 읽음"), + Message(imageName: "test4", storyOn: true, bf: true, name: "김아요", isRead: false, talk: "dsdsddios_god님의 릴스를 보내셨습니다. · ", time: "17시간"), + Message(imageName: "test5", storyOn: true, bf: false, name: "이치킨", isRead: true, talk: "", time: "월요일에 읽음"), + Message(imageName: "test6", storyOn: true, bf: false, name: "최피자", isRead: false, talk: "피자 깊티 보내드림 · ", time: "3일"), + Message(imageName: "test7", storyOn: true, bf: false, name: "윤여인", isRead: true, talk: "", time: "일요일에 읽음"), + Message(imageName: "test8", storyOn: true, bf: true, name: "오간지", isRead: false, talk: "내 인생에 빠꾸란 읍따 · ", time: "6시간"), + Message(imageName: "test9", storyOn: true, bf: true, name: "김장발", isRead: false, talk: "내 머릿결을 위해서 난 트리트먼트를 한닷! · ", time: "5분"), + + Message(imageName: "test10", storyOn: false, bf: false, name: "제갈소녀", isRead: true, talk: "", time: "토요일에 읽음"), + Message(imageName: "test11", storyOn: true, bf: false, name: "황보곰", isRead: false, talk: "연어 맛집 추천좀;; · ", time: "20시간"), + Message(imageName: "test12", storyOn: true, bf: false, name: "이고양", isRead: true, talk: "", time: "지난주에 읽음"), +] + +#Preview { + DMView() +} diff --git a/Instagram/Instagram/InstagramApp.swift b/Instagram/Instagram/InstagramApp.swift new file mode 100644 index 0000000..ba9dac4 --- /dev/null +++ b/Instagram/Instagram/InstagramApp.swift @@ -0,0 +1,17 @@ +// +// InstagramApp.swift +// Instagram +// +// Created by 김동섭 on 5/31/24. +// + +import SwiftUI + +@main +struct InstagramApp: App { + var body: some Scene { + WindowGroup { + DMView() + } + } +} diff --git a/Instagram/Instagram/Preview Content/Preview Assets.xcassets/Contents.json b/Instagram/Instagram/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Instagram/Instagram/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +}