forked from codesquad-members-2021/sidedish
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from HoonHaChoi/feat-2-side-dish_model
Feat 1, 2 (feat-1-Initial_UI) and (feat-2-side-dish_model)
- Loading branch information
Showing
12 changed files
with
372 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+19.4 KB
(200%)
...proj/project.xcworkspace/xcuserdata/hoonhachoi.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
14 changes: 14 additions & 0 deletions
14
.../Side-dish.xcodeproj/xcuserdata/jojung-yun.xcuserdatad/xcschemes/xcschememanagement.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>SchemeUserState</key> | ||
<dict> | ||
<key>Side-dish.xcscheme_^#shared#^_</key> | ||
<dict> | ||
<key>orderHint</key> | ||
<integer>0</integer> | ||
</dict> | ||
</dict> | ||
</dict> | ||
</plist> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// | ||
// Category.swift | ||
// Side-dish | ||
// | ||
// Created by 조중윤 on 2021/04/19. | ||
// | ||
|
||
import Foundation | ||
|
||
struct Category: Codable { | ||
let categoryID, name: String | ||
let items: [Item] | ||
|
||
enum CodingKeys: String, CodingKey { | ||
case categoryID = "category_id" | ||
case name, items | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// | ||
// Item.swift | ||
// Side-dish | ||
// | ||
// Created by 조중윤 on 2021/04/19. | ||
// | ||
|
||
import Foundation | ||
|
||
struct Item: Codable { | ||
let detailHash: String | ||
let image: String | ||
let alt: String | ||
let deliveryType: [DeliveryType] | ||
let title: String | ||
let description: String | ||
let nPrice: String? | ||
let sPrice: String | ||
let badge: [Badge]? | ||
|
||
enum CodingKeys: String, CodingKey { | ||
case detailHash = "detail_hash" | ||
case image, alt | ||
case deliveryType = "delivery_type" | ||
case title, description | ||
case nPrice = "n_price" | ||
case sPrice = "s_price" | ||
case badge | ||
} | ||
} | ||
|
||
enum DeliveryType: String, Codable { | ||
case dawnDelivery = "새벽배송" | ||
case nationDelivery = "전국택배" | ||
} | ||
|
||
enum Badge: String, Codable { | ||
case eventPrice = "이벤트특가" | ||
case launchingPrice = "론칭특가" | ||
case bestPrice = "베스트" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17506" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="ETQ-co-NCv"> | ||
<device id="retina6_1" orientation="portrait" appearance="light"/> | ||
<dependencies> | ||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17505"/> | ||
<capability name="Safe area layout guides" minToolsVersion="9.0"/> | ||
<capability name="System colors in document resources" minToolsVersion="11.0"/> | ||
<capability name="collection view cell content view" minToolsVersion="11.0"/> | ||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | ||
</dependencies> | ||
<scenes> | ||
<!--View Controller--> | ||
<scene sceneID="d8q-YB-ASa"> | ||
<objects> | ||
<viewController id="hGp-I0-H3m" customClass="ViewController" customModule="Side_dish" customModuleProvider="target" sceneMemberID="viewController"> | ||
<view key="view" contentMode="scaleToFill" id="fGK-fr-HD1"> | ||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/> | ||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
<subviews> | ||
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="glv-hr-1Zj"> | ||
<rect key="frame" x="16" y="44" width="382" height="818"/> | ||
<color key="backgroundColor" systemColor="systemBackgroundColor"/> | ||
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="FJY-EJ-ivF"> | ||
<size key="itemSize" width="128" height="128"/> | ||
<size key="headerReferenceSize" width="0.0" height="0.0"/> | ||
<size key="footerReferenceSize" width="0.0" height="0.0"/> | ||
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/> | ||
</collectionViewFlowLayout> | ||
<cells> | ||
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="dzH-tk-cUT"> | ||
<rect key="frame" x="0.0" y="0.0" width="128" height="128"/> | ||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | ||
<collectionViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" id="RFm-4m-Skm"> | ||
<rect key="frame" x="0.0" y="0.0" width="128" height="128"/> | ||
<autoresizingMask key="autoresizingMask"/> | ||
</collectionViewCellContentView> | ||
</collectionViewCell> | ||
</cells> | ||
</collectionView> | ||
</subviews> | ||
<viewLayoutGuide key="safeArea" id="ACr-dB-SwI"/> | ||
<color key="backgroundColor" systemColor="systemBackgroundColor"/> | ||
<constraints> | ||
<constraint firstItem="glv-hr-1Zj" firstAttribute="leading" secondItem="fGK-fr-HD1" secondAttribute="leading" constant="16" id="8j6-e1-g9S"/> | ||
<constraint firstItem="ACr-dB-SwI" firstAttribute="trailing" secondItem="glv-hr-1Zj" secondAttribute="trailing" constant="16" id="Ynq-eS-ldS"/> | ||
<constraint firstItem="ACr-dB-SwI" firstAttribute="bottom" secondItem="glv-hr-1Zj" secondAttribute="bottom" id="jmP-nE-ybx"/> | ||
<constraint firstItem="glv-hr-1Zj" firstAttribute="top" secondItem="ACr-dB-SwI" secondAttribute="top" id="oG6-0X-53F"/> | ||
</constraints> | ||
</view> | ||
<navigationItem key="navigationItem" id="jHs-wW-jUC"/> | ||
<connections> | ||
<outlet property="SideDishCollectionView" destination="glv-hr-1Zj" id="vmT-N9-uG7"/> | ||
</connections> | ||
</viewController> | ||
<placeholder placeholderIdentifier="IBFirstResponder" id="ySh-Mg-ZVv" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/> | ||
</objects> | ||
<point key="canvasLocation" x="983" y="141"/> | ||
</scene> | ||
<!--Navigation Controller--> | ||
<scene sceneID="SKe-cE-aiu"> | ||
<objects> | ||
<navigationController automaticallyAdjustsScrollViewInsets="NO" navigationBarHidden="YES" id="ETQ-co-NCv" sceneMemberID="viewController"> | ||
<toolbarItems/> | ||
<navigationBar key="navigationBar" contentMode="scaleToFill" id="N5n-Eh-W6D"> | ||
<autoresizingMask key="autoresizingMask"/> | ||
</navigationBar> | ||
<nil name="viewControllers"/> | ||
<connections> | ||
<segue destination="hGp-I0-H3m" kind="relationship" relationship="rootViewController" id="zth-7w-ZeX"/> | ||
</connections> | ||
</navigationController> | ||
<placeholder placeholderIdentifier="IBFirstResponder" id="Eqb-zu-rEU" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/> | ||
</objects> | ||
<point key="canvasLocation" x="278" y="129"/> | ||
</scene> | ||
</scenes> | ||
<resources> | ||
<systemColor name="systemBackgroundColor"> | ||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
</systemColor> | ||
</resources> | ||
</document> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,4 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { | |
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// | ||
// FoodCardCell.swift | ||
// Side-dish | ||
// | ||
// Created by 조중윤 on 2021/04/19. | ||
// | ||
|
||
import UIKit | ||
|
||
class FoodCardCell: UICollectionViewCell { | ||
static var identifier: String { | ||
return String(describing: self) | ||
} | ||
|
||
static var nib : UINib { | ||
return UINib(nibName: identifier, bundle: nil) | ||
} | ||
} |
Oops, something went wrong.