diff --git a/README.md b/README.md deleted file mode 100644 index 2f1e30e..0000000 --- a/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# ๐ŸŽ iOS_Study_A -SSUMC 5๊ธฐ iOS ์Šคํ„ฐ๋”” A์กฐ - -![umc+logo](https://github.com/SSUMC-5th-iOS/iOS_Study_A/assets/84546438/ae41d05c-6f71-47bc-9944-84230b5d4dd6) - -## ๐Ÿ’ป Member -| ๊น€์ˆ˜๋ฏผ | ๊น€๋ฏผ์ง€ | ๋ฐ•ํ˜„์ˆ˜ | ์‹ ํ˜œ๋ฆผ | -| :---------:|:----------:|:----------:|:----------:| -| ๋ฃจ์‹œ | ๋ฏธ๋‹ˆ | ์ˆฒ | ์ œ๋กœ | -| [kimsoomin20221789](https://github.com/kimsoomin20221789) | [kxmmxnzx](https://github.com/kxmmxnzx) | [00yhsp](https://github.com/00yhsp) | [tlsgPFla](https://github.com/tlsgPFla) | - -## ๐Ÿ“– Workbook (ํ”„๋ฆฌ๋งˆ์Šคํ„ฐ) -| ์ฃผ์ฐจ | ๋‚ด์šฉ | ๋ฏธ์…˜ | -| --- | --- | --- | -| 1์ฃผ์ฐจ | `Platform` | ๋ฐฐ๋‹ฌ์˜ ๋ฏผ์กฑ ํ™ˆ ํ™”๋ฉด ๊ตฌํ˜„ํ•˜๊ธฐ(1) | -| 2์ฃผ์ฐจ | `AutoLayout` | ๋ฐฐ๋‹ฌ์˜ ๋ฏผ์กฑ ํ™ˆ ํ™”๋ฉด ๊ตฌํ˜„ํ•˜๊ธฐ(2) | -| 3์ฃผ์ฐจ | `TableView & CollectionView` | ๋‹น๊ทผ๋งˆ์ผ“ ํ™ˆ ํ™”๋ฉด ๊ตฌํ˜„ํ•˜๊ธฐ(1) | -| 4์ฃผ์ฐจ | `ScrollView` | ๋‹น๊ทผ๋งˆ์ผ“ ํ™ˆ ํ™”๋ฉด ๊ตฌํ˜„ํ•˜๊ธฐ(2) | -| 5์ฃผ์ฐจ | `View Transition with Data` | ๋ฐฐ๋‹ฌ์˜ ๋ฏผ์กฑ ์žฅ๋ฐ”๊ตฌ๋‹ˆ๋กœ ๋ฐ์ดํ„ฐ ๋„˜๊ธฐ | -| 6์ฃผ์ฐจ | `Open Source` | ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ 2๊ฐœ ์ด์ƒ ์‚ฌ์šฉํ•ด์„œ ๋ทฐ ๋งŒ๋“ค๊ธฐ | -| 7์ฃผ์ฐจ | `Token & Social Login` | ์นด์นด์˜ค ๋กœ๊ทธ์ธ ๊ตฌํ˜„ํ•˜๊ธฐ | -| 8์ฃผ์ฐจ | `DB & DBMS` | ๊ฐ„๋‹จํ•œ ๋กœ๊ทธ์ธ, ํšŒ์›๊ฐ€์ž… ํ™”๋ฉด ๋งŒ๋“ค๊ธฐ - UserDefaults | -| 9์ฃผ์ฐจ | `Network` | Open API ํ™œ์šฉํ•˜๊ธฐ | -| 9์ฃผ์ฐจ | `Instagram Clone Coding` | ์ธ์Šคํƒ€๊ทธ๋žจ ํด๋ก  ์ฝ”๋”ฉํ•˜๊ธฐ | - -## ๐ŸŒณ branch ๊ทœ์น™ -`๋‹‰๋„ค์ž„/์ฃผ์ฐจ` - - - ex) bibi/week1 - -## ๐Ÿ‘พ Udemy -- https://www.udemy.com/course/comgongbro_ios_clonecoding/ diff --git a/iOS_Study_A.xcodeproj/xcuserdata/jiyoon.xcuserdatad/xcschemes/xcschememanagement.plist b/iOS_Study_A.xcodeproj/xcuserdata/jiyoon.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index d6ece4b..0000000 --- a/iOS_Study_A.xcodeproj/xcuserdata/jiyoon.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,14 +0,0 @@ - - - - - SchemeUserState - - iOS_Study_A.xcscheme_^#shared#^_ - - orderHint - 0 - - - - diff --git a/iOS_Study_A/AppDelegate.swift b/iOS_Study_A/AppDelegate.swift deleted file mode 100644 index a37563b..0000000 --- a/iOS_Study_A/AppDelegate.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// AppDelegate.swift -// iOS_Study_A -// -// Created by ๋ฐ•์ง€์œค on 2023/09/28. -// - -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/iOS_Study_A/Base.lproj/LaunchScreen.storyboard b/iOS_Study_A/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index 865e932..0000000 --- a/iOS_Study_A/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/iOS_Study_A/Base.lproj/Main.storyboard b/iOS_Study_A/Base.lproj/Main.storyboard deleted file mode 100644 index 25a7638..0000000 --- a/iOS_Study_A/Base.lproj/Main.storyboard +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/iOS_Study_A/Info.plist b/iOS_Study_A/Info.plist deleted file mode 100644 index dd3c9af..0000000 --- a/iOS_Study_A/Info.plist +++ /dev/null @@ -1,25 +0,0 @@ - - - - - UIApplicationSceneManifest - - UIApplicationSupportsMultipleScenes - - UISceneConfigurations - - UIWindowSceneSessionRoleApplication - - - UISceneConfigurationName - Default Configuration - UISceneDelegateClassName - $(PRODUCT_MODULE_NAME).SceneDelegate - UISceneStoryboardFile - Main - - - - - - diff --git a/iOS_Study_A/SceneDelegate.swift b/iOS_Study_A/SceneDelegate.swift deleted file mode 100644 index aaf78de..0000000 --- a/iOS_Study_A/SceneDelegate.swift +++ /dev/null @@ -1,52 +0,0 @@ -// -// SceneDelegate.swift -// iOS_Study_A -// -// Created by ๋ฐ•์ง€์œค on 2023/09/28. -// - -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/iOS_Study_A/ViewController.swift b/iOS_Study_A/ViewController.swift deleted file mode 100644 index 0804a27..0000000 --- a/iOS_Study_A/ViewController.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// ViewController.swift -// iOS_Study_A -// -// Created by ๋ฐ•์ง€์œค on 2023/09/28. -// - -import UIKit - -class ViewController: UIViewController { - - override func viewDidLoad() { - super.viewDidLoad() - // Do any additional setup after loading the view. - } - - -} - diff --git a/iOS_Study_A.xcodeproj/project.pbxproj b/week8/week8.xcodeproj/project.pbxproj similarity index 60% rename from iOS_Study_A.xcodeproj/project.pbxproj rename to week8/week8.xcodeproj/project.pbxproj index 1f5c336..1369398 100644 --- a/iOS_Study_A.xcodeproj/project.pbxproj +++ b/week8/week8.xcodeproj/project.pbxproj @@ -7,27 +7,22 @@ objects = { /* Begin PBXBuildFile section */ - 954B6B612AC57BE100FDCFAB /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 954B6B602AC57BE100FDCFAB /* AppDelegate.swift */; }; - 954B6B632AC57BE100FDCFAB /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 954B6B622AC57BE100FDCFAB /* SceneDelegate.swift */; }; - 954B6B652AC57BE100FDCFAB /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 954B6B642AC57BE100FDCFAB /* ViewController.swift */; }; - 954B6B682AC57BE100FDCFAB /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 954B6B662AC57BE100FDCFAB /* Main.storyboard */; }; - 954B6B6A2AC57BE200FDCFAB /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 954B6B692AC57BE200FDCFAB /* Assets.xcassets */; }; - 954B6B6D2AC57BE200FDCFAB /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 954B6B6B2AC57BE200FDCFAB /* LaunchScreen.storyboard */; }; + DF0A2FDB2B15B85C004B63CF /* week8App.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF0A2FDA2B15B85C004B63CF /* week8App.swift */; }; + DF0A2FDD2B15B85C004B63CF /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF0A2FDC2B15B85C004B63CF /* ContentView.swift */; }; + DF0A2FDF2B15B85E004B63CF /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DF0A2FDE2B15B85E004B63CF /* Assets.xcassets */; }; + DF0A2FE22B15B85E004B63CF /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DF0A2FE12B15B85E004B63CF /* Preview Assets.xcassets */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 954B6B5D2AC57BE100FDCFAB /* iOS_Study_A.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iOS_Study_A.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 954B6B602AC57BE100FDCFAB /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 954B6B622AC57BE100FDCFAB /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; - 954B6B642AC57BE100FDCFAB /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; - 954B6B672AC57BE100FDCFAB /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 954B6B692AC57BE200FDCFAB /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 954B6B6C2AC57BE200FDCFAB /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 954B6B6E2AC57BE200FDCFAB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + DF0A2FD72B15B85C004B63CF /* week8.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = week8.app; sourceTree = BUILT_PRODUCTS_DIR; }; + DF0A2FDA2B15B85C004B63CF /* week8App.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = week8App.swift; sourceTree = ""; }; + DF0A2FDC2B15B85C004B63CF /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + DF0A2FDE2B15B85E004B63CF /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + DF0A2FE12B15B85E004B63CF /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 954B6B5A2AC57BE100FDCFAB /* Frameworks */ = { + DF0A2FD42B15B85C004B63CF /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( @@ -37,72 +32,77 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 954B6B542AC57BE100FDCFAB = { + DF0A2FCE2B15B85C004B63CF = { isa = PBXGroup; children = ( - 954B6B5F2AC57BE100FDCFAB /* iOS_Study_A */, - 954B6B5E2AC57BE100FDCFAB /* Products */, + DF0A2FD92B15B85C004B63CF /* week8 */, + DF0A2FD82B15B85C004B63CF /* Products */, ); sourceTree = ""; }; - 954B6B5E2AC57BE100FDCFAB /* Products */ = { + DF0A2FD82B15B85C004B63CF /* Products */ = { isa = PBXGroup; children = ( - 954B6B5D2AC57BE100FDCFAB /* iOS_Study_A.app */, + DF0A2FD72B15B85C004B63CF /* week8.app */, ); name = Products; sourceTree = ""; }; - 954B6B5F2AC57BE100FDCFAB /* iOS_Study_A */ = { + DF0A2FD92B15B85C004B63CF /* week8 */ = { isa = PBXGroup; children = ( - 954B6B602AC57BE100FDCFAB /* AppDelegate.swift */, - 954B6B622AC57BE100FDCFAB /* SceneDelegate.swift */, - 954B6B642AC57BE100FDCFAB /* ViewController.swift */, - 954B6B662AC57BE100FDCFAB /* Main.storyboard */, - 954B6B692AC57BE200FDCFAB /* Assets.xcassets */, - 954B6B6B2AC57BE200FDCFAB /* LaunchScreen.storyboard */, - 954B6B6E2AC57BE200FDCFAB /* Info.plist */, + DF0A2FDA2B15B85C004B63CF /* week8App.swift */, + DF0A2FDC2B15B85C004B63CF /* ContentView.swift */, + DF0A2FDE2B15B85E004B63CF /* Assets.xcassets */, + DF0A2FE02B15B85E004B63CF /* Preview Content */, ); - path = iOS_Study_A; + path = week8; + sourceTree = ""; + }; + DF0A2FE02B15B85E004B63CF /* Preview Content */ = { + isa = PBXGroup; + children = ( + DF0A2FE12B15B85E004B63CF /* Preview Assets.xcassets */, + ); + path = "Preview Content"; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - 954B6B5C2AC57BE100FDCFAB /* iOS_Study_A */ = { + DF0A2FD62B15B85C004B63CF /* week8 */ = { isa = PBXNativeTarget; - buildConfigurationList = 954B6B712AC57BE200FDCFAB /* Build configuration list for PBXNativeTarget "iOS_Study_A" */; + buildConfigurationList = DF0A2FE52B15B85E004B63CF /* Build configuration list for PBXNativeTarget "week8" */; buildPhases = ( - 954B6B592AC57BE100FDCFAB /* Sources */, - 954B6B5A2AC57BE100FDCFAB /* Frameworks */, - 954B6B5B2AC57BE100FDCFAB /* Resources */, + DF0A2FD32B15B85C004B63CF /* Sources */, + DF0A2FD42B15B85C004B63CF /* Frameworks */, + DF0A2FD52B15B85C004B63CF /* Resources */, ); buildRules = ( ); dependencies = ( ); - name = iOS_Study_A; - productName = iOS_Study_A; - productReference = 954B6B5D2AC57BE100FDCFAB /* iOS_Study_A.app */; + name = week8; + productName = week8; + productReference = DF0A2FD72B15B85C004B63CF /* week8.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ - 954B6B552AC57BE100FDCFAB /* Project object */ = { + DF0A2FCF2B15B85C004B63CF /* Project object */ = { isa = PBXProject; attributes = { BuildIndependentTargetsInParallel = 1; LastSwiftUpdateCheck = 1430; LastUpgradeCheck = 1430; TargetAttributes = { - 954B6B5C2AC57BE100FDCFAB = { + DF0A2FD62B15B85C004B63CF = { CreatedOnToolsVersion = 14.3.1; }; }; }; - buildConfigurationList = 954B6B582AC57BE100FDCFAB /* Build configuration list for PBXProject "iOS_Study_A" */; + buildConfigurationList = DF0A2FD22B15B85C004B63CF /* Build configuration list for PBXProject "week8" */; compatibilityVersion = "Xcode 14.0"; developmentRegion = en; hasScannedForEncodings = 0; @@ -110,63 +110,42 @@ en, Base, ); - mainGroup = 954B6B542AC57BE100FDCFAB; - productRefGroup = 954B6B5E2AC57BE100FDCFAB /* Products */; + mainGroup = DF0A2FCE2B15B85C004B63CF; + productRefGroup = DF0A2FD82B15B85C004B63CF /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - 954B6B5C2AC57BE100FDCFAB /* iOS_Study_A */, + DF0A2FD62B15B85C004B63CF /* week8 */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - 954B6B5B2AC57BE100FDCFAB /* Resources */ = { + DF0A2FD52B15B85C004B63CF /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 954B6B6D2AC57BE200FDCFAB /* LaunchScreen.storyboard in Resources */, - 954B6B6A2AC57BE200FDCFAB /* Assets.xcassets in Resources */, - 954B6B682AC57BE100FDCFAB /* Main.storyboard in Resources */, + DF0A2FE22B15B85E004B63CF /* Preview Assets.xcassets in Resources */, + DF0A2FDF2B15B85E004B63CF /* Assets.xcassets in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ - 954B6B592AC57BE100FDCFAB /* Sources */ = { + DF0A2FD32B15B85C004B63CF /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 954B6B652AC57BE100FDCFAB /* ViewController.swift in Sources */, - 954B6B612AC57BE100FDCFAB /* AppDelegate.swift in Sources */, - 954B6B632AC57BE100FDCFAB /* SceneDelegate.swift in Sources */, + DF0A2FDD2B15B85C004B63CF /* ContentView.swift in Sources */, + DF0A2FDB2B15B85C004B63CF /* week8App.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ -/* Begin PBXVariantGroup section */ - 954B6B662AC57BE100FDCFAB /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 954B6B672AC57BE100FDCFAB /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 954B6B6B2AC57BE200FDCFAB /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 954B6B6C2AC57BE200FDCFAB /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - /* Begin XCBuildConfiguration section */ - 954B6B6F2AC57BE200FDCFAB /* Debug */ = { + DF0A2FE32B15B85E004B63CF /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -226,7 +205,7 @@ }; name = Debug; }; - 954B6B702AC57BE200FDCFAB /* Release */ = { + DF0A2FE42B15B85E004B63CF /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -280,18 +259,19 @@ }; name = Release; }; - 954B6B722AC57BE200FDCFAB /* Debug */ = { + DF0A2FE62B15B85E004B63CF /* 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 = "\"week8/Preview Content\""; + ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = iOS_Study_A/Info.plist; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; - INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; - INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; LD_RUNPATH_SEARCH_PATHS = ( @@ -299,7 +279,7 @@ "@executable_path/Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = "jiyoon.iOS-Study-A"; + PRODUCT_BUNDLE_IDENTIFIER = com.umcstudy.week8; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; @@ -307,18 +287,19 @@ }; name = Debug; }; - 954B6B732AC57BE200FDCFAB /* Release */ = { + DF0A2FE72B15B85E004B63CF /* 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 = "\"week8/Preview Content\""; + ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = iOS_Study_A/Info.plist; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; - INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; - INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; LD_RUNPATH_SEARCH_PATHS = ( @@ -326,7 +307,7 @@ "@executable_path/Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = "jiyoon.iOS-Study-A"; + PRODUCT_BUNDLE_IDENTIFIER = com.umcstudy.week8; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; @@ -337,25 +318,25 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 954B6B582AC57BE100FDCFAB /* Build configuration list for PBXProject "iOS_Study_A" */ = { + DF0A2FD22B15B85C004B63CF /* Build configuration list for PBXProject "week8" */ = { isa = XCConfigurationList; buildConfigurations = ( - 954B6B6F2AC57BE200FDCFAB /* Debug */, - 954B6B702AC57BE200FDCFAB /* Release */, + DF0A2FE32B15B85E004B63CF /* Debug */, + DF0A2FE42B15B85E004B63CF /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 954B6B712AC57BE200FDCFAB /* Build configuration list for PBXNativeTarget "iOS_Study_A" */ = { + DF0A2FE52B15B85E004B63CF /* Build configuration list for PBXNativeTarget "week8" */ = { isa = XCConfigurationList; buildConfigurations = ( - 954B6B722AC57BE200FDCFAB /* Debug */, - 954B6B732AC57BE200FDCFAB /* Release */, + DF0A2FE62B15B85E004B63CF /* Debug */, + DF0A2FE72B15B85E004B63CF /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; - rootObject = 954B6B552AC57BE100FDCFAB /* Project object */; + rootObject = DF0A2FCF2B15B85C004B63CF /* Project object */; } diff --git a/iOS_Study_A.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/week8/week8.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from iOS_Study_A.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to week8/week8.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/iOS_Study_A.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/week8/week8.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from iOS_Study_A.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to week8/week8.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/iOS_Study_A/Assets.xcassets/AccentColor.colorset/Contents.json b/week8/week8/Assets.xcassets/AccentColor.colorset/Contents.json similarity index 100% rename from iOS_Study_A/Assets.xcassets/AccentColor.colorset/Contents.json rename to week8/week8/Assets.xcassets/AccentColor.colorset/Contents.json diff --git a/iOS_Study_A/Assets.xcassets/AppIcon.appiconset/Contents.json b/week8/week8/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from iOS_Study_A/Assets.xcassets/AppIcon.appiconset/Contents.json rename to week8/week8/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/iOS_Study_A/Assets.xcassets/Contents.json b/week8/week8/Assets.xcassets/Contents.json similarity index 100% rename from iOS_Study_A/Assets.xcassets/Contents.json rename to week8/week8/Assets.xcassets/Contents.json diff --git a/week8/week8/Assets.xcassets/hot.imageset/Contents.json b/week8/week8/Assets.xcassets/hot.imageset/Contents.json new file mode 100644 index 0000000..c3dd4fa --- /dev/null +++ b/week8/week8/Assets.xcassets/hot.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2023-11-28 แ„‹แ…ฉแ„’แ…ฎ 8.35.05.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git "a/week8/week8/Assets.xcassets/hot.imageset/\354\212\244\355\201\254\353\246\260\354\203\267 2023-11-28 \354\230\244\355\233\204 8.35.05.png" "b/week8/week8/Assets.xcassets/hot.imageset/\354\212\244\355\201\254\353\246\260\354\203\267 2023-11-28 \354\230\244\355\233\204 8.35.05.png" new file mode 100644 index 0000000..a72d9e8 Binary files /dev/null and "b/week8/week8/Assets.xcassets/hot.imageset/\354\212\244\355\201\254\353\246\260\354\203\267 2023-11-28 \354\230\244\355\233\204 8.35.05.png" differ diff --git a/week8/week8/Assets.xcassets/pizza.imageset/Contents.json b/week8/week8/Assets.xcassets/pizza.imageset/Contents.json new file mode 100644 index 0000000..22ca9d8 --- /dev/null +++ b/week8/week8/Assets.xcassets/pizza.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "pizza.jpeg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/week8/week8/Assets.xcassets/pizza.imageset/pizza.jpeg b/week8/week8/Assets.xcassets/pizza.imageset/pizza.jpeg new file mode 100644 index 0000000..80d03b5 Binary files /dev/null and b/week8/week8/Assets.xcassets/pizza.imageset/pizza.jpeg differ diff --git a/week8/week8/ContentView.swift b/week8/week8/ContentView.swift new file mode 100644 index 0000000..8164462 --- /dev/null +++ b/week8/week8/ContentView.swift @@ -0,0 +1,302 @@ +// +// ContentView.swift +// week8 +// +// Created by ๋ฐ•ํ˜„์ˆ˜ on 2023/11/28. +// + +import SwiftUI + +class TextUpdater: ObservableObject { + @Published var price = 0 + @Published var additionalPrice = 0 +} + + +struct MyTabBarView: View { + @ObservedObject var textUpdater: TextUpdater + @State var isPresented = false + + func formatNumber(_ value: Int) -> String { + let numberFormatter = NumberFormatter() + numberFormatter.numberStyle = .decimal + return numberFormatter.string(from: NSNumber(value: value)) ?? "" + } + + var body: some View { + HStack { + VStack(alignment: .leading) { + HStack { + Text("๋ฐฐ๋‹ฌ์ตœ์†Œ์ฃผ๋ฌธ๊ธˆ์•ก").foregroundColor(Color.gray).font(.system(size: 15)) + Text("") + } + HStack { + Text("17,000์›") + Text("") + } + }.padding() + Button(action: { + self.isPresented.toggle() + }) { + Text("\(formatNumber(textUpdater.price + textUpdater.additionalPrice))์› ๋‹ด๊ธฐ") + .frame(maxWidth: .infinity, maxHeight: 60) + .foregroundColor(Color.white) + .font(.headline).bold() + }.background(RoundedRectangle(cornerRadius: 10, style: .continuous) + .fill(Color(UIColor(hex: 0x48D1CC)))) + .fullScreenCover(isPresented: $isPresented) { + NextView(price: textUpdater.price + textUpdater.additionalPrice) + } + .padding() + } + } +} + + +struct StoreView: View { + + let textUpdater = TextUpdater() + + @State private var isMediumSelected = false + @State private var isLargeSelected = false + @State private var isDoughSelected = false + @State private var isToppingSelected = false + + var body: some View { + + List() { + Image("pizza").resizable() + .frame(width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.width * 9 / 16) + VStack { + HStack { + Image("hot").resizable().frame(width: 30, height: 30) + Text("[์žฌ์ฃผ๋ฌธ1์œ„] ๋ฐ”์‹น๋ถˆ๊ณ ๊ธฐํ”ผ์ž").font(.title3).bold() + Spacer() + } + Text("๋ฐ”์‹น ์ตํžŒ ๋ถˆ๊ณ ๊ธฐ์˜ ํ’๋ฏธ๋ฅผ ์ž…์•ˆ ๊ฐ€๋“ ๋А๋‚„ ์ˆ˜ ์žˆ๋Š” ์ž๊ฐ€์ œ๋นต์„ ๋ช…ํฌํ”ผ์ž์˜ ์•ผ์‹ฌ์ž‘").foregroundColor(Color.gray) + HStack { + Text(" ") + Text("์˜์–‘์„ฑ๋ถ„ ๋ฐ ์•Œ๋ ˆ๋ฅด๊ธฐ ์„ฑ๋ถ„ ํ‘œ์‹œ ๋ณด๊ธฐ") + .font(.system(size: 10)) + .padding(3) + .background(Color(.systemGray6)) + .cornerRadius(5) + Spacer() + } + }.listRowSeparator(.hidden, edges: .top) + VStack { + HStack { + Text("๊ฐ€๊ฒฉ").font(.title3).bold() + Spacer() + Text("ํ•„์ˆ˜") + .padding(.horizontal, 7) + .padding(.vertical, 3) + .foregroundColor(Color.blue).background(Color.blue.opacity(0.2)).cornerRadius(10) + } + Text("") + Text("") + HStack { + Button(action: { + if isLargeSelected { + textUpdater.price -= 5000 + isLargeSelected = false + isMediumSelected = true + } else { + if isMediumSelected { + textUpdater.price -= 20000 + isMediumSelected = false + } + else { + textUpdater.price += 20000 + isMediumSelected = true + } + } + }) { + Image(systemName: isMediumSelected ? "circle.fill" : "circle") + }.buttonStyle(PlainButtonStyle()) + Text("M") + Spacer() + Text("20,000์›") + } + Text("") + Text("") + HStack { + Button(action: { + if isMediumSelected { + textUpdater.price += 5000 + isMediumSelected = false + isLargeSelected = true + } else { + if isLargeSelected { + textUpdater.price -= 25000 + isLargeSelected = false + } + else { + textUpdater.price += 25000 + isLargeSelected = true + } + } + }) { + Image(systemName: isLargeSelected ? "circle.fill" : "circle") + } + Text("L") + Spacer() + Text("25,000์›") + } + Text("") + } + VStack { + HStack { + Text("๋„์šฐ๋ณ€๊ฒฝ").font(.title3).bold() + Spacer() + Text("์„ ํƒ") + .foregroundColor(Color(.darkGray)) + .padding(.horizontal, 7) + .padding(.vertical, 3) + .background(Color.gray.opacity(0.2)) + .cornerRadius(10) + } + HStack { + Text("์ตœ๋Œ€ 1๊ฐœ ์„ ํƒ").foregroundColor(Color(.darkGray)).font(.system(size: 15)) + Spacer() + } + Text("") + Text("") + HStack { + Button(action: { + if isDoughSelected { + isDoughSelected = false + textUpdater.additionalPrice -= 4500 + } + else { + isDoughSelected = true + textUpdater.additionalPrice += 4500 + } + }) { + Image(systemName: isDoughSelected ? "square.fill" : "square") + }.buttonStyle(PlainButtonStyle()) + Text("ํฌ๋ฆผ๋ฆฌ์น˜๊ณจ๋“œ ํฌ๋Ÿฌ์ŠคํŠธ") + Spacer() + Text("+4,500์›") + } + Text("") + } + VStack { + HStack { + Text("ํ† ํ•‘์ถ”๊ฐ€").font(.title3).bold() + Spacer() + Text("์„ ํƒ") + .foregroundColor(Color(.darkGray)) + .padding(.horizontal, 7) + .padding(.vertical, 3) + .background(Color.gray.opacity(0.2)) + .cornerRadius(10) + } + HStack { + Text("์ตœ๋Œ€ 1๊ฐœ ์„ ํƒ").foregroundColor(Color(.darkGray)).font(.system(size: 15)) + Spacer() + } + Text("") + Text("") + HStack { + Button(action: { + if isToppingSelected { + isToppingSelected = false + textUpdater.additionalPrice -= 700 + } + else { + isToppingSelected = true + textUpdater.additionalPrice += 700 + } + }) { + Image(systemName: isToppingSelected ? "square.fill" : "square") + }.buttonStyle(PlainButtonStyle()) + Text("์˜ฅ์ˆ˜์ˆ˜") + Spacer() + Text("+700์›") + } + Text("") + } + }.listStyle(.plain) + .edgesIgnoringSafeArea(.top) + .listRowBackground( + RoundedRectangle(cornerRadius: 10) + .stroke(Color.red, lineWidth: 2) + ) + MyTabBarView(textUpdater: textUpdater) + } +} + +struct ContentView: View { + + init() { + UINavigationBar.appearance().setBackgroundImage(UIImage(), for: .default) + UINavigationBar.appearance().shadowImage = UIImage() + } + + var body: some View { + NavigationView { + VStack{ + StoreView() + .edgesIgnoringSafeArea(.top) + .navigationBarItems( + leading: + HStack { + Image(systemName: "arrow.left") + .foregroundColor(.black) + .padding(.leading, 5) + }, + trailing: + HStack { + Image(systemName: "house.fill") + Image(systemName: "square.and.arrow.up.fill") + Image(systemName: "cart.fill") + } + ).accentColor(.black) + + } + + } + } +} + +struct NextView: View { + @Environment(\.dismiss) private var dismiss + + let price: Int + + init(price: Int) { + self.price = price + } + + func formatNumber(_ value: Int) -> String { + let numberFormatter = NumberFormatter() + numberFormatter.numberStyle = .decimal + return numberFormatter.string(from: NSNumber(value: value)) ?? "" + } + + var body: some View { + Text(formatNumber(price)).onTapGesture { + dismiss() + } + } +} + +extension UIColor { + convenience init(hex: Int, alpha: CGFloat = 1.0) { + self.init( + red: CGFloat((hex >> 16) & 0xFF) / 255.0, + green: CGFloat((hex >> 8) & 0xFF) / 255.0, + blue: CGFloat(hex & 0xFF) / 255.0, + alpha: alpha + ) + } +} + +struct ContentView_Previews: PreviewProvider { + static var previews: some View { + ContentView() + } +} + + diff --git a/week8/week8/Preview Content/Preview Assets.xcassets/Contents.json b/week8/week8/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/week8/week8/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/week8/week8/week8App.swift b/week8/week8/week8App.swift new file mode 100644 index 0000000..034f0ec --- /dev/null +++ b/week8/week8/week8App.swift @@ -0,0 +1,17 @@ +// +// week8App.swift +// week8 +// +// Created by ๋ฐ•ํ˜„์ˆ˜ on 2023/11/28. +// + +import SwiftUI + +@main +struct week8App: App { + var body: some Scene { + WindowGroup { + ContentView() + } + } +}