diff --git a/.DS_Store b/.DS_Store index 4291296..a29729b 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/Project6-CandySearch/.DS_Store b/Project6-CandySearch/.DS_Store index 93c7999..0f7d905 100644 Binary files a/Project6-CandySearch/.DS_Store and b/Project6-CandySearch/.DS_Store differ diff --git a/Project6-CandySearch/Project6-CandySearch.xcodeproj/project.pbxproj b/Project6-CandySearch/Project6-CandySearch.xcodeproj/project.pbxproj index 68b66b1..b2d55a0 100644 --- a/Project6-CandySearch/Project6-CandySearch.xcodeproj/project.pbxproj +++ b/Project6-CandySearch/Project6-CandySearch.xcodeproj/project.pbxproj @@ -9,21 +9,27 @@ /* Begin PBXBuildFile section */ 6E25AA702A41CA2A00001221 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E25AA6F2A41CA2A00001221 /* AppDelegate.swift */; }; 6E25AA722A41CA2A00001221 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E25AA712A41CA2A00001221 /* SceneDelegate.swift */; }; - 6E25AA742A41CA2A00001221 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E25AA732A41CA2A00001221 /* ViewController.swift */; }; + 6E25AA742A41CA2A00001221 /* CandyListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E25AA732A41CA2A00001221 /* CandyListViewController.swift */; }; 6E25AA772A41CA2A00001221 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6E25AA752A41CA2A00001221 /* Main.storyboard */; }; 6E25AA792A41CA2B00001221 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6E25AA782A41CA2B00001221 /* Assets.xcassets */; }; 6E25AA7C2A41CA2B00001221 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6E25AA7A2A41CA2B00001221 /* LaunchScreen.storyboard */; }; + 6E25AA842A435FBC00001221 /* Candy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E25AA832A435FBC00001221 /* Candy.swift */; }; + 6E25AA862A43626500001221 /* candies.json in Resources */ = {isa = PBXBuildFile; fileRef = 6E25AA852A43626500001221 /* candies.json */; }; + 6EC57FDF2A4E1EEB009276CE /* CandyDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6EC57FDE2A4E1EEB009276CE /* CandyDetailViewController.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 6E25AA6C2A41CA2A00001221 /* Project6-CandySearch.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Project6-CandySearch.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 6E25AA6F2A41CA2A00001221 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 6E25AA712A41CA2A00001221 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; - 6E25AA732A41CA2A00001221 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 6E25AA732A41CA2A00001221 /* CandyListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CandyListViewController.swift; sourceTree = ""; }; 6E25AA762A41CA2A00001221 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 6E25AA782A41CA2B00001221 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 6E25AA7B2A41CA2B00001221 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 6E25AA7D2A41CA2B00001221 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 6E25AA832A435FBC00001221 /* Candy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Candy.swift; sourceTree = ""; }; + 6E25AA852A43626500001221 /* candies.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = candies.json; sourceTree = ""; }; + 6EC57FDE2A4E1EEB009276CE /* CandyDetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CandyDetailViewController.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -56,10 +62,12 @@ 6E25AA6E2A41CA2A00001221 /* Project6-CandySearch */ = { isa = PBXGroup; children = ( + 6E25AA8B2A4366F400001221 /* Controller */, + 6E25AA8A2A4366E300001221 /* View */, + 6E25AA892A4366DA00001221 /* Model */, + 6E25AA852A43626500001221 /* candies.json */, 6E25AA6F2A41CA2A00001221 /* AppDelegate.swift */, 6E25AA712A41CA2A00001221 /* SceneDelegate.swift */, - 6E25AA732A41CA2A00001221 /* ViewController.swift */, - 6E25AA752A41CA2A00001221 /* Main.storyboard */, 6E25AA782A41CA2B00001221 /* Assets.xcassets */, 6E25AA7A2A41CA2B00001221 /* LaunchScreen.storyboard */, 6E25AA7D2A41CA2B00001221 /* Info.plist */, @@ -67,6 +75,31 @@ path = "Project6-CandySearch"; sourceTree = ""; }; + 6E25AA892A4366DA00001221 /* Model */ = { + isa = PBXGroup; + children = ( + 6E25AA832A435FBC00001221 /* Candy.swift */, + ); + path = Model; + sourceTree = ""; + }; + 6E25AA8A2A4366E300001221 /* View */ = { + isa = PBXGroup; + children = ( + 6E25AA752A41CA2A00001221 /* Main.storyboard */, + ); + path = View; + sourceTree = ""; + }; + 6E25AA8B2A4366F400001221 /* Controller */ = { + isa = PBXGroup; + children = ( + 6E25AA732A41CA2A00001221 /* CandyListViewController.swift */, + 6EC57FDE2A4E1EEB009276CE /* CandyDetailViewController.swift */, + ); + path = Controller; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -128,6 +161,7 @@ 6E25AA7C2A41CA2B00001221 /* LaunchScreen.storyboard in Resources */, 6E25AA792A41CA2B00001221 /* Assets.xcassets in Resources */, 6E25AA772A41CA2A00001221 /* Main.storyboard in Resources */, + 6E25AA862A43626500001221 /* candies.json in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -138,7 +172,9 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 6E25AA742A41CA2A00001221 /* ViewController.swift in Sources */, + 6E25AA742A41CA2A00001221 /* CandyListViewController.swift in Sources */, + 6EC57FDF2A4E1EEB009276CE /* CandyDetailViewController.swift in Sources */, + 6E25AA842A435FBC00001221 /* Candy.swift in Sources */, 6E25AA702A41CA2A00001221 /* AppDelegate.swift in Sources */, 6E25AA722A41CA2A00001221 /* SceneDelegate.swift in Sources */, ); @@ -292,6 +328,7 @@ INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UIStatusBarStyle = UIStatusBarStyleLightContent; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; LD_RUNPATH_SEARCH_PATHS = ( @@ -319,6 +356,7 @@ INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UIStatusBarStyle = UIStatusBarStyleLightContent; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; LD_RUNPATH_SEARCH_PATHS = ( diff --git a/Project6-CandySearch/Project6-CandySearch.xcodeproj/xcuserdata/wootae.xcuserdatad/xcschemes/xcschememanagement.plist b/Project6-CandySearch/Project6-CandySearch.xcodeproj/xcuserdata/wootae.xcuserdatad/xcschemes/xcschememanagement.plist index a8f9689..9061b6e 100644 --- a/Project6-CandySearch/Project6-CandySearch.xcodeproj/xcuserdata/wootae.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/Project6-CandySearch/Project6-CandySearch.xcodeproj/xcuserdata/wootae.xcuserdatad/xcschemes/xcschememanagement.plist @@ -7,7 +7,7 @@ Project6-CandySearch.xcscheme_^#shared#^_ orderHint - 1 + 0 diff --git a/Project6-CandySearch/Project6-CandySearch/.DS_Store b/Project6-CandySearch/Project6-CandySearch/.DS_Store new file mode 100644 index 0000000..07101ee Binary files /dev/null and b/Project6-CandySearch/Project6-CandySearch/.DS_Store differ diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/AppIcon.appiconset/Contents.json b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/AppIcon.appiconset/Contents.json index 13613e3..99174b9 100644 --- a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,8 +1,88 @@ { "images" : [ { - "idiom" : "universal", - "platform" : "ios", + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", "size" : "1024x1024" } ], diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Candy Cane.imageset/Candy Cane.png b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Candy Cane.imageset/Candy Cane.png new file mode 100644 index 0000000..988ad78 Binary files /dev/null and b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Candy Cane.imageset/Candy Cane.png differ diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Candy Cane.imageset/Candy Cane@2x.png b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Candy Cane.imageset/Candy Cane@2x.png new file mode 100644 index 0000000..f0e18bc Binary files /dev/null and b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Candy Cane.imageset/Candy Cane@2x.png differ diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Candy Cane.imageset/Candy Cane@3x.png b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Candy Cane.imageset/Candy Cane@3x.png new file mode 100644 index 0000000..c1a3931 Binary files /dev/null and b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Candy Cane.imageset/Candy Cane@3x.png differ diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Candy Cane.imageset/Contents.json b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Candy Cane.imageset/Contents.json new file mode 100644 index 0000000..61422fc --- /dev/null +++ b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Candy Cane.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "Candy Cane.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "Candy Cane@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "Candy Cane@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Caramel.imageset/Caramel.png b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Caramel.imageset/Caramel.png new file mode 100644 index 0000000..e8c04e9 Binary files /dev/null and b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Caramel.imageset/Caramel.png differ diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Caramel.imageset/Caramel@2x.png b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Caramel.imageset/Caramel@2x.png new file mode 100644 index 0000000..f4655e0 Binary files /dev/null and b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Caramel.imageset/Caramel@2x.png differ diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Caramel.imageset/Caramel@3x.png b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Caramel.imageset/Caramel@3x.png new file mode 100644 index 0000000..2c52c93 Binary files /dev/null and b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Caramel.imageset/Caramel@3x.png differ diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Caramel.imageset/Contents.json b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Caramel.imageset/Contents.json new file mode 100644 index 0000000..8bb2897 --- /dev/null +++ b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Caramel.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "Caramel.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "Caramel@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "Caramel@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Chocolate Bar.imageset/Chocolate Bar.png b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Chocolate Bar.imageset/Chocolate Bar.png new file mode 100644 index 0000000..1732d25 Binary files /dev/null and b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Chocolate Bar.imageset/Chocolate Bar.png differ diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Chocolate Bar.imageset/Chocolate Bar@2x.png b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Chocolate Bar.imageset/Chocolate Bar@2x.png new file mode 100644 index 0000000..4f17234 Binary files /dev/null and b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Chocolate Bar.imageset/Chocolate Bar@2x.png differ diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Chocolate Bar.imageset/Chocolate Bar@3x.png b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Chocolate Bar.imageset/Chocolate Bar@3x.png new file mode 100644 index 0000000..a7ce62e Binary files /dev/null and b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Chocolate Bar.imageset/Chocolate Bar@3x.png differ diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Chocolate Bar.imageset/Contents.json b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Chocolate Bar.imageset/Contents.json new file mode 100644 index 0000000..b23eebe --- /dev/null +++ b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Chocolate Bar.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "Chocolate Bar.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "Chocolate Bar@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "Chocolate Bar@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Chocolate Chip.imageset/Chocolate Chip.png b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Chocolate Chip.imageset/Chocolate Chip.png new file mode 100644 index 0000000..d46a58c Binary files /dev/null and b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Chocolate Chip.imageset/Chocolate Chip.png differ diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Chocolate Chip.imageset/Chocolate Chip@2x.png b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Chocolate Chip.imageset/Chocolate Chip@2x.png new file mode 100644 index 0000000..7a213d5 Binary files /dev/null and b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Chocolate Chip.imageset/Chocolate Chip@2x.png differ diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Chocolate Chip.imageset/Chocolate Chip@3x.png b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Chocolate Chip.imageset/Chocolate Chip@3x.png new file mode 100644 index 0000000..d1f4863 Binary files /dev/null and b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Chocolate Chip.imageset/Chocolate Chip@3x.png differ diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Chocolate Chip.imageset/Contents.json b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Chocolate Chip.imageset/Contents.json new file mode 100644 index 0000000..235e0b7 --- /dev/null +++ b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Chocolate Chip.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "Chocolate Chip.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "Chocolate Chip@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "Chocolate Chip@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Contents.json b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Contents.json index 73c0059..da4a164 100644 --- a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Contents.json +++ b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Contents.json @@ -1,6 +1,6 @@ { "info" : { - "author" : "xcode", - "version" : 1 + "version" : 1, + "author" : "xcode" } -} +} \ No newline at end of file diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Dark Chocolate.imageset/Contents.json b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Dark Chocolate.imageset/Contents.json new file mode 100644 index 0000000..8af2ff2 --- /dev/null +++ b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Dark Chocolate.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "Dark Chocolate.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "Dark Chocolate@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "Dark Chocolate@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Dark Chocolate.imageset/Dark Chocolate.png b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Dark Chocolate.imageset/Dark Chocolate.png new file mode 100644 index 0000000..2faa2f0 Binary files /dev/null and b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Dark Chocolate.imageset/Dark Chocolate.png differ diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Dark Chocolate.imageset/Dark Chocolate@2x.png b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Dark Chocolate.imageset/Dark Chocolate@2x.png new file mode 100644 index 0000000..e9df7ca Binary files /dev/null and b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Dark Chocolate.imageset/Dark Chocolate@2x.png differ diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Dark Chocolate.imageset/Dark Chocolate@3x.png b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Dark Chocolate.imageset/Dark Chocolate@3x.png new file mode 100644 index 0000000..404972b Binary files /dev/null and b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Dark Chocolate.imageset/Dark Chocolate@3x.png differ diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Gummi Bear.imageset/Contents.json b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Gummi Bear.imageset/Contents.json new file mode 100644 index 0000000..374b478 --- /dev/null +++ b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Gummi Bear.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "Gummi Bear.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "Gummi Bear@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "Gummi Bear@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Gummi Bear.imageset/Gummi Bear.png b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Gummi Bear.imageset/Gummi Bear.png new file mode 100644 index 0000000..65dbdb1 Binary files /dev/null and b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Gummi Bear.imageset/Gummi Bear.png differ diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Gummi Bear.imageset/Gummi Bear@2x.png b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Gummi Bear.imageset/Gummi Bear@2x.png new file mode 100644 index 0000000..6a21ec9 Binary files /dev/null and b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Gummi Bear.imageset/Gummi Bear@2x.png differ diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Gummi Bear.imageset/Gummi Bear@3x.png b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Gummi Bear.imageset/Gummi Bear@3x.png new file mode 100644 index 0000000..38e6b09 Binary files /dev/null and b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Gummi Bear.imageset/Gummi Bear@3x.png differ diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Inline-Logo.imageset/Contents.json b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Inline-Logo.imageset/Contents.json new file mode 100644 index 0000000..481fb59 --- /dev/null +++ b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Inline-Logo.imageset/Contents.json @@ -0,0 +1,15 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "Inline-Logo.pdf" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + }, + "properties" : { + "template-rendering-intent" : "original" + } +} \ No newline at end of file diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Inline-Logo.imageset/Inline-Logo.pdf b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Inline-Logo.imageset/Inline-Logo.pdf new file mode 100644 index 0000000..3a8daee Binary files /dev/null and b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Inline-Logo.imageset/Inline-Logo.pdf differ diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Jaw Breaker.imageset/Contents.json b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Jaw Breaker.imageset/Contents.json new file mode 100644 index 0000000..4438b40 --- /dev/null +++ b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Jaw Breaker.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "Jaw Breaker.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "Jaw Breaker@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "Jaw Breaker@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Jaw Breaker.imageset/Jaw Breaker.png b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Jaw Breaker.imageset/Jaw Breaker.png new file mode 100644 index 0000000..882aae8 Binary files /dev/null and b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Jaw Breaker.imageset/Jaw Breaker.png differ diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Jaw Breaker.imageset/Jaw Breaker@2x.png b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Jaw Breaker.imageset/Jaw Breaker@2x.png new file mode 100644 index 0000000..c122049 Binary files /dev/null and b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Jaw Breaker.imageset/Jaw Breaker@2x.png differ diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Jaw Breaker.imageset/Jaw Breaker@3x.png b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Jaw Breaker.imageset/Jaw Breaker@3x.png new file mode 100644 index 0000000..0d04ef8 Binary files /dev/null and b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Jaw Breaker.imageset/Jaw Breaker@3x.png differ diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Logo.imageset/CandySearch.pdf b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Logo.imageset/CandySearch.pdf new file mode 100644 index 0000000..1735d0c Binary files /dev/null and b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Logo.imageset/CandySearch.pdf differ diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Logo.imageset/Contents.json b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Logo.imageset/Contents.json new file mode 100644 index 0000000..58108ec --- /dev/null +++ b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Logo.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "CandySearch.pdf" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Lollipop.imageset/Contents.json b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Lollipop.imageset/Contents.json new file mode 100644 index 0000000..c6d7f0c --- /dev/null +++ b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Lollipop.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "Lollipop.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "Lollipop@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "Lollipop@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Lollipop.imageset/Lollipop.png b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Lollipop.imageset/Lollipop.png new file mode 100644 index 0000000..57d69c4 Binary files /dev/null and b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Lollipop.imageset/Lollipop.png differ diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Lollipop.imageset/Lollipop@2x.png b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Lollipop.imageset/Lollipop@2x.png new file mode 100644 index 0000000..ef4418b Binary files /dev/null and b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Lollipop.imageset/Lollipop@2x.png differ diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Lollipop.imageset/Lollipop@3x.png b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Lollipop.imageset/Lollipop@3x.png new file mode 100644 index 0000000..797fd88 Binary files /dev/null and b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Lollipop.imageset/Lollipop@3x.png differ diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Sour Chew.imageset/Contents.json b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Sour Chew.imageset/Contents.json new file mode 100644 index 0000000..14cab2f --- /dev/null +++ b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Sour Chew.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "Sour Chew.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "Sour Chew@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "Sour Chew@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Sour Chew.imageset/Sour Chew.png b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Sour Chew.imageset/Sour Chew.png new file mode 100644 index 0000000..693364b Binary files /dev/null and b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Sour Chew.imageset/Sour Chew.png differ diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Sour Chew.imageset/Sour Chew@2x.png b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Sour Chew.imageset/Sour Chew@2x.png new file mode 100644 index 0000000..48a8a93 Binary files /dev/null and b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Sour Chew.imageset/Sour Chew@2x.png differ diff --git a/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Sour Chew.imageset/Sour Chew@3x.png b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Sour Chew.imageset/Sour Chew@3x.png new file mode 100644 index 0000000..6c98edf Binary files /dev/null and b/Project6-CandySearch/Project6-CandySearch/Assets.xcassets/Sour Chew.imageset/Sour Chew@3x.png differ diff --git a/Project6-CandySearch/Project6-CandySearch/Base.lproj/LaunchScreen.storyboard b/Project6-CandySearch/Project6-CandySearch/Base.lproj/LaunchScreen.storyboard index 865e932..734662e 100644 --- a/Project6-CandySearch/Project6-CandySearch/Base.lproj/LaunchScreen.storyboard +++ b/Project6-CandySearch/Project6-CandySearch/Base.lproj/LaunchScreen.storyboard @@ -1,8 +1,10 @@ - - + + + - + + @@ -11,10 +13,19 @@ - + - + + + + + + + + + + @@ -22,4 +33,10 @@ + + + + + + diff --git a/Project6-CandySearch/Project6-CandySearch/Base.lproj/Main.storyboard b/Project6-CandySearch/Project6-CandySearch/Base.lproj/Main.storyboard deleted file mode 100644 index 25a7638..0000000 --- a/Project6-CandySearch/Project6-CandySearch/Base.lproj/Main.storyboard +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Project6-CandySearch/Project6-CandySearch/Controller/CandyDetailViewController.swift b/Project6-CandySearch/Project6-CandySearch/Controller/CandyDetailViewController.swift new file mode 100644 index 0000000..ecd9cae --- /dev/null +++ b/Project6-CandySearch/Project6-CandySearch/Controller/CandyDetailViewController.swift @@ -0,0 +1,23 @@ + +import UIKit + +class CandyDetailViewController: UIViewController { + var currentCandy : Candy? + @IBOutlet weak var candyNameLabel: UILabel! + @IBOutlet weak var candyCategoryLabel: UILabel! + @IBOutlet weak var candyImageView: UIImageView! + + override func viewDidLoad() { + super.viewDidLoad() + setUI() + } + + // MARK: - 선택된 셀의 정보를 화면에 표시합니다. + func setUI() { + guard let currentCandy = currentCandy, let candyName = currentCandy.name, let candyCategory = currentCandy.category else {return} + candyNameLabel.text = candyName + candyCategoryLabel.text = candyCategory + candyImageView.image = UIImage(named: candyName) + } + +} diff --git a/Project6-CandySearch/Project6-CandySearch/Controller/CandyListViewController.swift b/Project6-CandySearch/Project6-CandySearch/Controller/CandyListViewController.swift new file mode 100644 index 0000000..be17d9c --- /dev/null +++ b/Project6-CandySearch/Project6-CandySearch/Controller/CandyListViewController.swift @@ -0,0 +1,156 @@ + +import UIKit + +class CandyListViewController: UIViewController { + + var dataModel : [Candy]? + var searchResult : [Candy]? + var candySearchBar = UISearchController(searchResultsController: nil) + + @IBOutlet weak var candyTableView: UITableView! + + override func viewDidLoad() { + super.viewDidLoad() + setUI() + } + + // MARK: - 간접 세그웨이를 통해 다음 화면으로 데이터 전달 + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + if segue.identifier == "candySelected" { + + let datas = candySearchBar.isActive ? searchResult : dataModel + guard let candies = datas, let nextVC = segue.destination as? CandyDetailViewController, let currentRow = sender as? Int else{ + return + } + nextVC.currentCandy = candies[currentRow] + } + } + + func setUI() { + getDataModel() + setSearchBar() + setNavigationBar() + } + + func setNavigationBar() { + // MARK: - 네비게이션 바 배경색 설정 + let navigationAppearance = UINavigationBarAppearance() + navigationAppearance.backgroundColor = .systemGreen + navigationController?.navigationBar.standardAppearance = navigationAppearance + navigationController?.navigationBar.scrollEdgeAppearance = navigationAppearance + navigationController?.navigationBar.compactAppearance = navigationAppearance + navigationController?.navigationBar.compactScrollEdgeAppearance = navigationAppearance + navigationController?.setNeedsStatusBarAppearanceUpdate() + + // MARK: - 네비게이션 바 타이틀 이미지로 설정 + let titleImageVIew = { + let imageView = UIImageView(image: UIImage(named: "Inline-Logo")) + imageView.contentMode = .scaleAspectFit + return imageView + }() + self.navigationItem.titleView = titleImageVIew + + // MARK: - 네비게이션 바 서치 바 설정 및 스크롤 중에도 보이도록 합니다.(기본적으로 숨김) + self.navigationItem.hidesSearchBarWhenScrolling = false + self.navigationItem.searchController = candySearchBar + } + + func getDataModel() { + dataModel = Candy.loadData() + } + + + func setSearchBar() { + candySearchBar.searchBar.scopeButtonTitles = ["All","Chocolate","Hard","Other"] + + // MARK: - UISearchResultsUpdating의 delegate 설정 + candySearchBar.searchResultsUpdater = self + + // MARK: - 검색 중에 서치 바 영역 제외 백그라운드 어둡게 변경(default : true) + candySearchBar.obscuresBackgroundDuringPresentation = false + + /* + 자동으로 cancel 버튼 활성화(default : true) + candySearchBar.automaticallyShowsCancelButton + + 서치 바 활성화 시 네비게이션 타이틀 숨기기(default : true) + candySearchBar.hidesNavigationBarDuringPresentation + + 항상 스코프 바가 표시되도록함(default : false) + candySearchBar.searchBar.showsScopeBar + */ + } + + // MARK: - 현재 서치바의 텍스트 입력상태 및 스코프를 검사하여 참조 데이터 모델을 업데이트합니다. + func checkSearchBar(_ typedText : String, _ scope : Int) { + if typedText.isEmpty { + searchResult = dataModel + }else { + searchResult = dataModel?.filter{ + $0.name?.lowercased().contains(typedText) ?? false + } + } + if scope != 0 { + searchResult = searchResult?.filter{ + $0.category! == candySearchBar.searchBar.scopeButtonTitles![scope] + } + } + } + +} + +extension CandyListViewController : UITableViewDataSource { + + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + let datas = candySearchBar.isActive ? searchResult : dataModel + guard let candies = datas else { + fatalError("Row 개수 계산 중 오류 발생") + } + return candies.count + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let datas = candySearchBar.isActive ? searchResult : dataModel + guard let candies = datas else { + fatalError("셀 설정 중 오류 발생") + } + let cell = tableView.dequeueReusableCell(withIdentifier: "candycell", for: indexPath) + + // MARK: - 셀 UI 설정 + var cellConfiguration = cell.defaultContentConfiguration() + cellConfiguration.text = candies[indexPath.row].name + cellConfiguration.secondaryText = candies[indexPath.row].category + cell.contentConfiguration = cellConfiguration + + return cell + } + +} + +extension CandyListViewController : UITableViewDelegate { + + // MARK: - 셀 선택 시 간접 세그웨이를 통해 prepare 메서드가 호출되도록 함 + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + performSegue(withIdentifier: "candySelected", sender: indexPath.row) + } +} + +extension CandyListViewController : UISearchResultsUpdating { + + // MARK: - 서치바(스코프 바 포함)에 변화가 발생할 때마다 호출됩니다. + func updateSearchResults(for searchController: UISearchController) { + //현재 선택된 스코프 인덱스 + let selectedScope = searchController.searchBar.selectedScopeButtonIndex + //현재 서치바의 입력된 텍스트 + let typedText = searchController.searchBar.text?.lowercased() ?? "" + + checkSearchBar(typedText, selectedScope) + + // MARK: - 데이터 모델의 변경사항을 테이블에 반영합니다 + self.candyTableView.performBatchUpdates { + candyTableView.reloadSections(IndexSet.init(integer: .zero), with: .automatic) + } + } + +} + diff --git a/Project6-CandySearch/Project6-CandySearch/Info.plist b/Project6-CandySearch/Project6-CandySearch/Info.plist index dd3c9af..d04b3d4 100644 --- a/Project6-CandySearch/Project6-CandySearch/Info.plist +++ b/Project6-CandySearch/Project6-CandySearch/Info.plist @@ -21,5 +21,7 @@ + UIViewControllerBasedStatusBarAppearance + diff --git a/Project6-CandySearch/Project6-CandySearch/Model/Candy.swift b/Project6-CandySearch/Project6-CandySearch/Model/Candy.swift new file mode 100644 index 0000000..8ae1bd6 --- /dev/null +++ b/Project6-CandySearch/Project6-CandySearch/Model/Candy.swift @@ -0,0 +1,21 @@ + +import Foundation + +struct Candy : Codable { + var category : String? + var name : String? + + // MARK: - 번들의 JSON파일에서 데이터를 로드합니다. + static func loadData() -> [Candy]? { + var candies : [Candy]? + do { + if let bundlePath = Bundle.main.path(forResource: "candies", ofType: "json"), + let jsonData = try String(contentsOfFile: bundlePath).data(using: .utf8) { + candies = try JSONDecoder().decode([Candy].self, from: jsonData) + } + } catch { + print(error) + } + return candies + } +} diff --git a/Project6-CandySearch/Project6-CandySearch/View/Base.lproj/Main.storyboard b/Project6-CandySearch/Project6-CandySearch/View/Base.lproj/Main.storyboard new file mode 100644 index 0000000..693896a --- /dev/null +++ b/Project6-CandySearch/Project6-CandySearch/View/Base.lproj/Main.storyboard @@ -0,0 +1,146 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Project6-CandySearch/Project6-CandySearch/ViewController.swift b/Project6-CandySearch/Project6-CandySearch/ViewController.swift deleted file mode 100644 index 207cbc8..0000000 --- a/Project6-CandySearch/Project6-CandySearch/ViewController.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// ViewController.swift -// Project6-CandySearch -// -// Created by 최우태 on 2023/06/20. -// - -import UIKit - -class ViewController: UIViewController { - - override func viewDidLoad() { - super.viewDidLoad() - // Do any additional setup after loading the view. - } - - -} - diff --git a/Project6-CandySearch/Project6-CandySearch/candies.json b/Project6-CandySearch/Project6-CandySearch/candies.json new file mode 100644 index 0000000..e844d8e --- /dev/null +++ b/Project6-CandySearch/Project6-CandySearch/candies.json @@ -0,0 +1,38 @@ +[ + { + "category" : "Chocolate", + "name" : "Chocolate Bar" + }, + { + "category" : "Chocolate", + "name" : "Chocolate Chip" + }, + { + "category" : "Chocolate", + "name" : "Dark Chocolate" + }, + { + "category" : "Hard", + "name" : "Lollipop" + }, + { + "category" : "Hard", + "name" : "Candy Cane" + }, + { + "category" : "Hard", + "name" : "Jaw Breaker" + }, + { + "category" : "Other", + "name" : "Caramel" + }, + { + "category" : "Other", + "name" : "Sour Chew" + }, + { + "category" : "Other", + "name" : "Gummi Bear" + } +] diff --git a/Project6.xcworkspace/xcuserdata/wootae.xcuserdatad/UserInterfaceState.xcuserstate b/Project6.xcworkspace/xcuserdata/wootae.xcuserdatad/UserInterfaceState.xcuserstate index e021f00..f0f579d 100644 Binary files a/Project6.xcworkspace/xcuserdata/wootae.xcuserdatad/UserInterfaceState.xcuserstate and b/Project6.xcworkspace/xcuserdata/wootae.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Project6.xcworkspace/xcuserdata/wootae.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Project6.xcworkspace/xcuserdata/wootae.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..6547fe8 --- /dev/null +++ b/Project6.xcworkspace/xcuserdata/wootae.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/README.md b/README.md index 25b00eb..83b4579 100644 --- a/README.md +++ b/README.md @@ -1,36 +1,20 @@ -## 프로젝트 번호 : 프로젝트 이름 +## 프로젝트 6 : CandySearch -간략한 설명 +## 날짜별 구현 사항 -이 앱의 레퍼런스는 [soapyigu의 Swift-30-Projects](https://github.com/soapyigu/Swift-30-Projects)입니다. -기본 기능을 모두 구현했다면, 디자인 및 추가 기능 구현은 자유롭게 해주세요. +### 2023.06.20. +- [네비게이션 바 및 상태바 설정](https://github.com/AKAPUCH/Project6-CandySearch/commit/50b9810099946b55f2490137b833404aaf9ce2c0) -## 가이드 +### 2023.06.22. +- [데이터 모델 파일 추가 및 테이블 뷰 구현](https://github.com/AKAPUCH/Project6-CandySearch/commit/de47de80d5570c70f079bc2a585cc01917e5177c) -영상 가이드는 [코드스쿼드 pr연습](https://www.youtube.com/watch?v=lFinZfu3QO0)을 참조해주세요. - -1. 본인 이름으로 브랜치(ex: PAKA)를 생성한 후, 자신의 레포로 fork해주세요. - -2. fork 한 레포에서 기능 또는 화면 단위로 새 브랜치(ex: pr1)를 생성 후 작업 및 커밋합니다. - -3. 커밋했던 브랜치(pr1)에서 자신의 이름 브랜치(PAKA)로 PR을 올려주세요. - -4. 코드 리뷰를 받고 모든 수정사항을 반영한 후 `squash and merge` 옵션으로 자신의 브랜치에 merge해주세요. - -5. merge했던 브랜치(pr1)에서 fork한 레포의 main 브랜치로 checkout후 해당 브랜치(pr1)를 삭제합니다. - -6. 다음 명령어들을 순차적으로 실행합니다. - -``` - git remote add upstream https://github.com/Swift-Master/Project1-GoodAsOldPhones - - git fetch upstream `본인의 브랜치명(ex:PAKA)` - - git rebase upstream `upstream/본인의브랜치명(ex:PAKA)` -``` - -7. 2번으로 돌아가 새로운 작업을 반복합니다. +### 2023.06.30. +- [검색 기능 구현](https://github.com/AKAPUCH/Project6-CandySearch/commit/e81562f27c36047196f89cb7f1054b8be84afa3e) +- [화면전환 및 디테일 뷰 구현](https://github.com/AKAPUCH/Project6-CandySearch/commit/20cec39b19b30786c67b7ea908f120d951aa0a85) +- [타이틀 이미지로 변경 및 카테고리 라벨 추가](https://github.com/AKAPUCH/Project6-CandySearch/commit/2892619514f0ed79c9042d938d50b297d122118f) +- [코드 정리 및 주석 추가](https://github.com/AKAPUCH/Project6-CandySearch/commit/49533197f36a336ae1560933219e8c64afe96b8c) ## 실제 화면 -![시뮬레이터화면](./이미지이름.gif) + +![시뮬레이터화면](./project6.gif) diff --git a/Reference/.DS_Store b/Reference/.DS_Store index 54c2c1d..e87d2cc 100644 Binary files a/Reference/.DS_Store and b/Reference/.DS_Store differ diff --git a/Reference/CandySearch.xcodeproj/xcuserdata/wootae.xcuserdatad/xcschemes/xcschememanagement.plist b/Reference/CandySearch.xcodeproj/xcuserdata/wootae.xcuserdatad/xcschemes/xcschememanagement.plist index 6db655a..bd732a7 100644 --- a/Reference/CandySearch.xcodeproj/xcuserdata/wootae.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/Reference/CandySearch.xcodeproj/xcuserdata/wootae.xcuserdatad/xcschemes/xcschememanagement.plist @@ -7,7 +7,7 @@ CandySearch.xcscheme_^#shared#^_ orderHint - 0 + 1 diff --git a/Reference/CandySearch/.DS_Store b/Reference/CandySearch/.DS_Store new file mode 100644 index 0000000..bb95bbf Binary files /dev/null and b/Reference/CandySearch/.DS_Store differ diff --git a/Reference/CandySearch/Assets.xcassets/AppIcon.appiconset/Contents.json b/Reference/CandySearch/Assets.xcassets/AppIcon.appiconset/Contents.json index eeea76c..99174b9 100644 --- a/Reference/CandySearch/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/Reference/CandySearch/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -2,72 +2,92 @@ "images" : [ { "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" + "scale" : "2x", + "size" : "20x20" }, { "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" + "scale" : "3x", + "size" : "20x20" }, { "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" + "scale" : "2x", + "size" : "29x29" }, { "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" + "scale" : "3x", + "size" : "29x29" }, { "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" + "scale" : "2x", + "size" : "40x40" }, { "idiom" : "iphone", - "size" : "60x60", - "scale" : "3x" + "scale" : "3x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" }, { "idiom" : "ipad", - "size" : "29x29", - "scale" : "1x" + "scale" : "2x", + "size" : "20x20" }, { "idiom" : "ipad", - "size" : "29x29", - "scale" : "2x" + "scale" : "1x", + "size" : "29x29" }, { "idiom" : "ipad", - "size" : "40x40", - "scale" : "1x" + "scale" : "2x", + "size" : "29x29" }, { "idiom" : "ipad", - "size" : "40x40", - "scale" : "2x" + "scale" : "1x", + "size" : "40x40" }, { "idiom" : "ipad", - "size" : "76x76", - "scale" : "1x" + "scale" : "2x", + "size" : "40x40" }, { "idiom" : "ipad", - "size" : "76x76", - "scale" : "2x" + "scale" : "1x", + "size" : "76x76" }, { "idiom" : "ipad", - "size" : "83.5x83.5", - "scale" : "2x" + "scale" : "2x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" } ], "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 } -} \ No newline at end of file +} diff --git a/Reference/CandySearch/Base.lproj/LaunchScreen.storyboard b/Reference/CandySearch/Base.lproj/LaunchScreen.storyboard index af739e7..5f9efaa 100644 --- a/Reference/CandySearch/Base.lproj/LaunchScreen.storyboard +++ b/Reference/CandySearch/Base.lproj/LaunchScreen.storyboard @@ -1,7 +1,10 @@ - - + + + - + + + @@ -13,18 +16,18 @@ - + - + - + diff --git a/Reference/CandySearch/Base.lproj/Main.storyboard b/Reference/CandySearch/Base.lproj/Main.storyboard index 92e5493..420e9b3 100644 --- a/Reference/CandySearch/Base.lproj/Main.storyboard +++ b/Reference/CandySearch/Base.lproj/Main.storyboard @@ -1,8 +1,10 @@ - - + + + - - + + + @@ -10,9 +12,10 @@ + - - + + @@ -31,25 +34,25 @@ - + - - + + - + @@ -57,7 +60,7 @@ - + @@ -96,34 +99,34 @@ - + - + - + - + - + @@ -143,9 +146,10 @@ + - + @@ -158,8 +162,9 @@ + - + @@ -170,10 +175,10 @@ - - - + + + diff --git a/project6.gif b/project6.gif new file mode 100644 index 0000000..ddf1b01 Binary files /dev/null and b/project6.gif differ