diff --git a/3rdWeek/Seminar-2/Seminar-2/AppDelegate.swift b/3rdWeek/Seminar-2/Seminar-2/AppDelegate.swift new file mode 100644 index 0000000..93c232d --- /dev/null +++ b/3rdWeek/Seminar-2/Seminar-2/AppDelegate.swift @@ -0,0 +1,36 @@ +// +// AppDelegate.swift +// Seminar-2 +// +// Created by 신지원 on 2023/08/01. +// + +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/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/AccentColor.colorset/Contents.json b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/AppIcon.appiconset/Contents.json b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/3rdWeek/Seminar-2/Seminar-2/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/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/Contents.json b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_1.imageset/Contents.json b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_1.imageset/Contents.json new file mode 100644 index 0000000..113ee1f --- /dev/null +++ b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_1.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "스크린샷 2023-08-01 오후 3.47.47.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git "a/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_1.imageset/\354\212\244\355\201\254\353\246\260\354\203\267 2023-08-01 \354\230\244\355\233\204 3.47.47.png" "b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_1.imageset/\354\212\244\355\201\254\353\246\260\354\203\267 2023-08-01 \354\230\244\355\233\204 3.47.47.png" new file mode 100644 index 0000000..6360e7b Binary files /dev/null and "b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_1.imageset/\354\212\244\355\201\254\353\246\260\354\203\267 2023-08-01 \354\230\244\355\233\204 3.47.47.png" differ diff --git a/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_10.imageset/Contents.json b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_10.imageset/Contents.json new file mode 100644 index 0000000..19853f9 --- /dev/null +++ b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_10.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "IMG_8641.JPG", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_10.imageset/IMG_8641.JPG b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_10.imageset/IMG_8641.JPG new file mode 100644 index 0000000..04bd001 Binary files /dev/null and b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_10.imageset/IMG_8641.JPG differ diff --git a/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_11.imageset/Contents.json b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_11.imageset/Contents.json new file mode 100644 index 0000000..5625a95 --- /dev/null +++ b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_11.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "IMG_8645.JPG", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_11.imageset/IMG_8645.JPG b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_11.imageset/IMG_8645.JPG new file mode 100644 index 0000000..8563812 Binary files /dev/null and b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_11.imageset/IMG_8645.JPG differ diff --git a/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_12.imageset/Contents.json b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_12.imageset/Contents.json new file mode 100644 index 0000000..0f5d98c --- /dev/null +++ b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_12.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "IMG_8647.JPG", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_12.imageset/IMG_8647.JPG b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_12.imageset/IMG_8647.JPG new file mode 100644 index 0000000..45e93c1 Binary files /dev/null and b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_12.imageset/IMG_8647.JPG differ diff --git a/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_13.imageset/Contents.json b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_13.imageset/Contents.json new file mode 100644 index 0000000..838ae79 --- /dev/null +++ b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_13.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "IMG_8651.JPG", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_13.imageset/IMG_8651.JPG b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_13.imageset/IMG_8651.JPG new file mode 100644 index 0000000..f7fd1ca Binary files /dev/null and b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_13.imageset/IMG_8651.JPG differ diff --git a/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_14.imageset/Contents.json b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_14.imageset/Contents.json new file mode 100644 index 0000000..7f558ad --- /dev/null +++ b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_14.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "IMG_8652.JPG", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_14.imageset/IMG_8652.JPG b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_14.imageset/IMG_8652.JPG new file mode 100644 index 0000000..54053e7 Binary files /dev/null and b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_14.imageset/IMG_8652.JPG differ diff --git a/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_15.imageset/Contents.json b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_15.imageset/Contents.json new file mode 100644 index 0000000..a89f9f6 --- /dev/null +++ b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_15.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "IMG_8657.JPG", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_15.imageset/IMG_8657.JPG b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_15.imageset/IMG_8657.JPG new file mode 100644 index 0000000..ba43a0a Binary files /dev/null and b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_15.imageset/IMG_8657.JPG differ diff --git a/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_16.imageset/Contents.json b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_16.imageset/Contents.json new file mode 100644 index 0000000..9407e4e --- /dev/null +++ b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_16.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "IMG_8650.JPG", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_16.imageset/IMG_8650.JPG b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_16.imageset/IMG_8650.JPG new file mode 100644 index 0000000..d1d37fb Binary files /dev/null and b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_16.imageset/IMG_8650.JPG differ diff --git a/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_17.imageset/Contents.json b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_17.imageset/Contents.json new file mode 100644 index 0000000..954c456 --- /dev/null +++ b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_17.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "IMG_8658.JPG", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_17.imageset/IMG_8658.JPG b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_17.imageset/IMG_8658.JPG new file mode 100644 index 0000000..b0b7b62 Binary files /dev/null and b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_17.imageset/IMG_8658.JPG differ diff --git a/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_18.imageset/Contents.json b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_18.imageset/Contents.json new file mode 100644 index 0000000..873aa90 --- /dev/null +++ b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_18.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "IMG_8646.JPG", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_18.imageset/IMG_8646.JPG b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_18.imageset/IMG_8646.JPG new file mode 100644 index 0000000..d4be5bb Binary files /dev/null and b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_18.imageset/IMG_8646.JPG differ diff --git a/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_2.imageset/Contents.json b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_2.imageset/Contents.json new file mode 100644 index 0000000..2e096b3 --- /dev/null +++ b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_2.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "스크린샷 2023-08-01 오후 3.47.54.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git "a/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_2.imageset/\354\212\244\355\201\254\353\246\260\354\203\267 2023-08-01 \354\230\244\355\233\204 3.47.54.png" "b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_2.imageset/\354\212\244\355\201\254\353\246\260\354\203\267 2023-08-01 \354\230\244\355\233\204 3.47.54.png" new file mode 100644 index 0000000..df47c95 Binary files /dev/null and "b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_2.imageset/\354\212\244\355\201\254\353\246\260\354\203\267 2023-08-01 \354\230\244\355\233\204 3.47.54.png" differ diff --git a/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_3.imageset/Contents.json b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_3.imageset/Contents.json new file mode 100644 index 0000000..6091b98 --- /dev/null +++ b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_3.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "스크린샷 2023-08-01 오후 3.48.00.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git "a/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_3.imageset/\354\212\244\355\201\254\353\246\260\354\203\267 2023-08-01 \354\230\244\355\233\204 3.48.00.png" "b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_3.imageset/\354\212\244\355\201\254\353\246\260\354\203\267 2023-08-01 \354\230\244\355\233\204 3.48.00.png" new file mode 100644 index 0000000..f322a07 Binary files /dev/null and "b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_3.imageset/\354\212\244\355\201\254\353\246\260\354\203\267 2023-08-01 \354\230\244\355\233\204 3.48.00.png" differ diff --git a/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_4.imageset/Contents.json b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_4.imageset/Contents.json new file mode 100644 index 0000000..405d86a --- /dev/null +++ b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_4.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "스크린샷 2023-08-01 오후 3.48.13.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git "a/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_4.imageset/\354\212\244\355\201\254\353\246\260\354\203\267 2023-08-01 \354\230\244\355\233\204 3.48.13.png" "b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_4.imageset/\354\212\244\355\201\254\353\246\260\354\203\267 2023-08-01 \354\230\244\355\233\204 3.48.13.png" new file mode 100644 index 0000000..4ee9271 Binary files /dev/null and "b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_4.imageset/\354\212\244\355\201\254\353\246\260\354\203\267 2023-08-01 \354\230\244\355\233\204 3.48.13.png" differ diff --git a/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_5.imageset/Contents.json b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_5.imageset/Contents.json new file mode 100644 index 0000000..bf2dc8f --- /dev/null +++ b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_5.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "스크린샷 2023-08-01 오후 3.48.20.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git "a/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_5.imageset/\354\212\244\355\201\254\353\246\260\354\203\267 2023-08-01 \354\230\244\355\233\204 3.48.20.png" "b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_5.imageset/\354\212\244\355\201\254\353\246\260\354\203\267 2023-08-01 \354\230\244\355\233\204 3.48.20.png" new file mode 100644 index 0000000..852dbaf Binary files /dev/null and "b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_5.imageset/\354\212\244\355\201\254\353\246\260\354\203\267 2023-08-01 \354\230\244\355\233\204 3.48.20.png" differ diff --git a/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_6.imageset/Contents.json b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_6.imageset/Contents.json new file mode 100644 index 0000000..d73de59 --- /dev/null +++ b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_6.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "스크린샷 2023-08-01 오후 3.48.28.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git "a/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_6.imageset/\354\212\244\355\201\254\353\246\260\354\203\267 2023-08-01 \354\230\244\355\233\204 3.48.28.png" "b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_6.imageset/\354\212\244\355\201\254\353\246\260\354\203\267 2023-08-01 \354\230\244\355\233\204 3.48.28.png" new file mode 100644 index 0000000..6290d76 Binary files /dev/null and "b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_6.imageset/\354\212\244\355\201\254\353\246\260\354\203\267 2023-08-01 \354\230\244\355\233\204 3.48.28.png" differ diff --git a/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_7.imageset/Contents.json b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_7.imageset/Contents.json new file mode 100644 index 0000000..fcc4e24 --- /dev/null +++ b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_7.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "IMG_8637.JPG", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_7.imageset/IMG_8637.JPG b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_7.imageset/IMG_8637.JPG new file mode 100644 index 0000000..695d4fe Binary files /dev/null and b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_7.imageset/IMG_8637.JPG differ diff --git a/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_8.imageset/Contents.json b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_8.imageset/Contents.json new file mode 100644 index 0000000..f5adcb0 --- /dev/null +++ b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_8.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "IMG_8639.JPG", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_8.imageset/IMG_8639.JPG b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_8.imageset/IMG_8639.JPG new file mode 100644 index 0000000..9aee856 Binary files /dev/null and b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_8.imageset/IMG_8639.JPG differ diff --git a/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_9.imageset/Contents.json b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_9.imageset/Contents.json new file mode 100644 index 0000000..4632659 --- /dev/null +++ b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_9.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "IMG_8640.JPG", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_9.imageset/IMG_8640.JPG b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_9.imageset/IMG_8640.JPG new file mode 100644 index 0000000..90705fb Binary files /dev/null and b/3rdWeek/Seminar-2/Seminar-2/Assets.xcassets/photo_9.imageset/IMG_8640.JPG differ diff --git a/3rdWeek/Seminar-2/Seminar-2/Info.plist b/3rdWeek/Seminar-2/Seminar-2/Info.plist new file mode 100644 index 0000000..0eb786d --- /dev/null +++ b/3rdWeek/Seminar-2/Seminar-2/Info.plist @@ -0,0 +1,23 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + + + + + + diff --git a/3rdWeek/Seminar-2/Seminar-2/PhotoCollectionViewCell.swift b/3rdWeek/Seminar-2/Seminar-2/PhotoCollectionViewCell.swift new file mode 100644 index 0000000..ec2224b --- /dev/null +++ b/3rdWeek/Seminar-2/Seminar-2/PhotoCollectionViewCell.swift @@ -0,0 +1,80 @@ +// +// PhotoCollectionViewCell.swift +// Seminar-2 +// +// Created by 신지원 on 2023/08/01. +// + +import UIKit + +import SnapKit +import Then + +class PhotoCollectionViewCell: UICollectionViewCell { + + var isTapped: Bool = false { + didSet { + updateButton() + } + } + + //Closure 를 저장할 수 있는 Optional Stored Property + //하트버튼이 tap 되면 tap 의 유무를 closure 에 넘겨준다. + var handler: (() -> (Void))? + + static let identifier = "PhotoCell" + + let photoImage = UIImageView() + let button = UIButton() + + override init(frame: CGRect) { + super.init(frame: frame) + + setStyle() + setLayout() + } + + @available(*, unavailable) + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + func setStyle() { + button.do { + $0.tintColor = .white + $0.addTarget(self, action: #selector(heartButtonTapped), for: .touchUpInside) + } + } + + func setLayout() { + + contentView.addSubview(photoImage) + contentView.addSubview(button) + + photoImage.snp.makeConstraints { + $0.edges.equalToSuperview() + } + + button.snp.makeConstraints { + $0.leading.bottom.equalToSuperview().inset(5) + $0.size.equalTo(30) + } + } + + + func configureCell(_ photo: Photo) { + + photoImage.image = photo.image + isTapped = photo.heartTapped + } + + func updateButton() { + let image = isTapped ? "heart.fill" : "heart" + button.setImage(UIImage(systemName: image), for: .normal) + } + + @objc + func heartButtonTapped() { + handler?() + } +} diff --git a/3rdWeek/Seminar-2/Seminar-2/PhotoImage.swift b/3rdWeek/Seminar-2/Seminar-2/PhotoImage.swift new file mode 100644 index 0000000..13f0968 --- /dev/null +++ b/3rdWeek/Seminar-2/Seminar-2/PhotoImage.swift @@ -0,0 +1,30 @@ +// +// PhotoImage.swift +// Seminar-2 +// +// Created by 신지원 on 2023/08/01. +// + +import UIKit.UIImage + +extension UIImage { + + static var photo_1: UIImage { UIImage(named: "photo_1")! } + static var photo_2: UIImage { UIImage(named: "photo_2")! } + static var photo_3: UIImage { UIImage(named: "photo_3")! } + static var photo_4: UIImage { UIImage(named: "photo_4")! } + static var photo_5: UIImage { UIImage(named: "photo_5")! } + static var photo_6: UIImage { UIImage(named: "photo_6")! } + static var photo_7: UIImage { UIImage(named: "photo_7")! } + static var photo_8: UIImage { UIImage(named: "photo_8")! } + static var photo_9: UIImage { UIImage(named: "photo_9")! } + static var photo_10: UIImage { UIImage(named: "photo_10")! } + static var photo_11: UIImage { UIImage(named: "photo_11")! } + static var photo_12: UIImage { UIImage(named: "photo_12")! } + static var photo_13: UIImage { UIImage(named: "photo_13")! } + static var photo_14: UIImage { UIImage(named: "photo_14")! } + static var photo_15: UIImage { UIImage(named: "photo_15")! } + static var photo_16: UIImage { UIImage(named: "photo_16")! } + static var photo_17: UIImage { UIImage(named: "photo_17")! } + static var photo_18: UIImage { UIImage(named: "photo_18")! } +} diff --git a/3rdWeek/Seminar-2/Seminar-2/PhotoViewController.swift b/3rdWeek/Seminar-2/Seminar-2/PhotoViewController.swift new file mode 100644 index 0000000..d1bfc1f --- /dev/null +++ b/3rdWeek/Seminar-2/Seminar-2/PhotoViewController.swift @@ -0,0 +1,110 @@ +// +// ViewController.swift +// Seminar-2 +// +// Created by 신지원 on 2023/08/01. +// + +import UIKit + +import SnapKit +import Then + +struct Photo { + let image: UIImage + var heartTapped: Bool +} + +extension Photo { + static func dummy() -> [Photo] { + var photos: [Photo] = [] + for number in 1...18 { + photos.append(Photo(image: UIImage(named: "photo_\(number)")!, + heartTapped: false)) + } + return photos + photos + } +} + +class PhotoViewController: UIViewController { + + private var dummyCase = Photo.dummy() { + didSet { + self.collectionView.reloadData() + } + } + + private lazy var collectionView = UICollectionView(frame: .zero, + collectionViewLayout: flowLayout) + + private let flowLayout = UICollectionViewFlowLayout() + + override func viewDidLoad() { + super.viewDidLoad() + setStyle() + setLayout() + // Do any additional setup after loading the view. + } + + func setStyle() { + + collectionView.do { + $0.register(PhotoCollectionViewCell.self, forCellWithReuseIdentifier: PhotoCollectionViewCell.identifier) + $0.showsVerticalScrollIndicator = false + $0.delegate = self + $0.dataSource = self + } + } + + func setLayout() { + + view.addSubview(collectionView) + + collectionView.snp.makeConstraints { + $0.top.equalTo(view.safeAreaInsets) + $0.leading.trailing.bottom.equalToSuperview() + } + } +} + +extension PhotoViewController: UICollectionViewDelegate {} + +extension PhotoViewController: UICollectionViewDataSource { + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + + return dummyCase.count + } + + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + + guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: PhotoCollectionViewCell.identifier, for: indexPath) as? PhotoCollectionViewCell else { return UICollectionViewCell() } + + cell.configureCell(dummyCase[indexPath.item]) + + cell.handler = { [weak self] in + guard let self else { return } + self.dummyCase[indexPath.item].heartTapped.toggle() + } + + return cell + } +} + +extension PhotoViewController: UICollectionViewDelegateFlowLayout { + + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { + + return CGSize(width: (UIScreen.main.bounds.width - 6) / 3 , height: (UIScreen.main.bounds.width - 6) / 3) + } + + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat { + + return 3 + } + + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat { + + return 3 + } +} + diff --git a/3rdWeek/Seminar-2/Seminar-2/SceneDelegate.swift b/3rdWeek/Seminar-2/Seminar-2/SceneDelegate.swift new file mode 100644 index 0000000..4b28e5b --- /dev/null +++ b/3rdWeek/Seminar-2/Seminar-2/SceneDelegate.swift @@ -0,0 +1,53 @@ +// +// SceneDelegate.swift +// Seminar-2 +// +// Created by 신지원 on 2023/08/01. +// + +import UIKit + +class SceneDelegate: UIResponder, UIWindowSceneDelegate { + + var window: UIWindow? + + + func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { + guard let windowScene = (scene as? UIWindowScene) else { return } + self.window = UIWindow(windowScene: windowScene) + let navigationController = UINavigationController(rootViewController: PhotoViewController()) + self.window?.rootViewController = navigationController + self.window?.makeKeyAndVisible() + } + + func sceneDidDisconnect(_ scene: UIScene) { + // Called as the scene is being released by the system. + // This occurs shortly after the scene enters the background, or when its session is discarded. + // Release any resources associated with this scene that can be re-created the next time the scene connects. + // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead). + } + + func sceneDidBecomeActive(_ scene: UIScene) { + // Called when the scene has moved from an inactive state to an active state. + // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. + } + + func sceneWillResignActive(_ scene: UIScene) { + // Called when the scene will move from an active state to an inactive state. + // This may occur due to temporary interruptions (ex. an incoming phone call). + } + + func sceneWillEnterForeground(_ scene: UIScene) { + // Called as the scene transitions from the background to the foreground. + // Use this method to undo the changes made on entering the background. + } + + func sceneDidEnterBackground(_ scene: UIScene) { + // Called as the scene transitions from the foreground to the background. + // Use this method to save data, release shared resources, and store enough scene-specific state information + // to restore the scene back to its current state. + } + + +} + diff --git a/3rdWeek/Seminar/Seminar/CarrotTableViewCell.swift b/3rdWeek/Seminar/Seminar/CarrotTableViewCell.swift index 6360cc9..694c6db 100644 --- a/3rdWeek/Seminar/Seminar/CarrotTableViewCell.swift +++ b/3rdWeek/Seminar/Seminar/CarrotTableViewCell.swift @@ -145,5 +145,6 @@ class CarrotTableViewCell: UITableViewCell { var price = String(carrot.price) price.insert(",", at: price.index(price.endIndex, offsetBy: -3)) priceLabel.text = price + "원" + } }