Skip to content

Commit 0f0afbb

Browse files
authored
feat: 화면 구현 (#3)
feat: 화면 구현 (#3)
2 parents fddfcdb + 9c8116e commit 0f0afbb

File tree

233 files changed

+4237
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

233 files changed

+4237
-0
lines changed

cherrydan.xcodeproj/project.pbxproj

Lines changed: 585 additions & 0 deletions
Large diffs are not rendered by default.

cherrydan.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>SchemeUserState</key>
6+
<dict>
7+
<key>cherrydan.xcscheme_^#shared#^_</key>
8+
<dict>
9+
<key>orderHint</key>
10+
<integer>0</integer>
11+
</dict>
12+
</dict>
13+
</dict>
14+
</plist>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Bucket
3+
uuid = "9A343E02-612E-48FC-B9F2-4740D85E157E"
4+
type = "1"
5+
version = "2.0">
6+
</Bucket>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>SchemeUserState</key>
6+
<dict>
7+
<key>cherrydan.xcscheme_^#shared#^_</key>
8+
<dict>
9+
<key>orderHint</key>
10+
<integer>0</integer>
11+
</dict>
12+
</dict>
13+
</dict>
14+
</plist>
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
3+
<device id="retina5_9" orientation="portrait" appearance="light"/>
4+
<dependencies>
5+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
6+
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
7+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
8+
</dependencies>
9+
<scenes>
10+
<!--View Controller-->
11+
<scene sceneID="EHf-IW-A2E">
12+
<objects>
13+
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
14+
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
15+
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
16+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
17+
<subviews>
18+
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="logoImg" translatesAutoresizingMaskIntoConstraints="NO" id="zs9-CE-ngM">
19+
<rect key="frame" x="141.66666666666666" y="363" width="90" height="86"/>
20+
</imageView>
21+
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="GJd-Yh-RWb">
22+
<rect key="frame" x="152.33333333333334" y="457" width="70.333333333333343" height="32.333333333333314"/>
23+
<attributedString key="attributedText">
24+
<fragment content="체리단">
25+
<attributes>
26+
<color key="NSColor" name="textColor" catalog="System" colorSpace="catalog"/>
27+
<font key="NSFont" metaFont="system" size="27"/>
28+
<font key="NSOriginalFont" metaFont="system" size="27"/>
29+
<paragraphStyle key="NSParagraphStyle" alignment="center" lineBreakMode="truncatingTail" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
30+
</attributes>
31+
</fragment>
32+
</attributedString>
33+
<nil key="highlightedColor"/>
34+
</label>
35+
</subviews>
36+
<viewLayoutGuide key="safeArea" id="Bcu-3y-fUS"/>
37+
<color key="backgroundColor" red="0.97647058823529409" green="0.95294117647058818" blue="0.9137254901960784" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
38+
<constraints>
39+
<constraint firstItem="zs9-CE-ngM" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" constant="-1" id="20l-zv-Fth"/>
40+
<constraint firstItem="GJd-Yh-RWb" firstAttribute="top" secondItem="zs9-CE-ngM" secondAttribute="bottom" constant="8" id="CPj-jB-Gp4"/>
41+
<constraint firstItem="zs9-CE-ngM" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="Er6-NB-s1p"/>
42+
<constraint firstItem="GJd-Yh-RWb" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="LyS-Hs-T8P"/>
43+
</constraints>
44+
</view>
45+
</viewController>
46+
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
47+
</objects>
48+
<point key="canvasLocation" x="53" y="375"/>
49+
</scene>
50+
</scenes>
51+
<resources>
52+
<image name="logoImg" width="90" height="86"/>
53+
</resources>
54+
</document>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import SwiftUI
2+
3+
@main
4+
struct cherrydanApp: App {
5+
6+
var body: some Scene {
7+
WindowGroup {
8+
MainTabView()
9+
}
10+
}
11+
}
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
import Foundation
2+
3+
enum SocialPlatform: String, CaseIterable, Codable {
4+
case instagram = "instagram"
5+
case youtube = "youtube"
6+
case naverBlog = "naver_blog"
7+
8+
var displayName: String {
9+
switch self {
10+
case .instagram: return "인스타그램"
11+
case .youtube: return "유튜브"
12+
case .naverBlog: return "네이버 블로그"
13+
}
14+
}
15+
16+
var imageName: String {
17+
switch self {
18+
case .instagram: return "instagram"
19+
case .youtube: return "youtube"
20+
case .naverBlog: return "naver"
21+
}
22+
23+
}
24+
}
25+
26+
struct CampaignData: Codable, Equatable, Identifiable {
27+
let id = UUID() // TODO: 서버에서 전달받는 ID로 추후 변경 필요
28+
let image: String
29+
let remainingDays: Int
30+
let title: String
31+
let subtitle: String
32+
let applicantCount: Int
33+
let totalApplicants: Int
34+
let socialPlatform: SocialPlatform
35+
let reviewPlatform: String
36+
37+
static let dummy: [CampaignData] = [
38+
CampaignData(
39+
image: "https://picsum.photos/200",
40+
remainingDays: 6,
41+
title: "[화보H] 맛있는 로스 필스 체험",
42+
subtitle: "로스 필스 2인분",
43+
applicantCount: 23,
44+
totalApplicants: 12,
45+
socialPlatform: .instagram,
46+
reviewPlatform: "강남맛집"
47+
),
48+
CampaignData(
49+
image: "https://picsum.photos/300",
50+
remainingDays: 11,
51+
title: "[먹방] 마늘마늘 삼겹살",
52+
subtitle: "마늘 삼겹살 2인분",
53+
applicantCount: 135,
54+
totalApplicants: 8,
55+
socialPlatform: .instagram,
56+
reviewPlatform: "리뷰노트"
57+
),
58+
CampaignData(
59+
image: "https://picsum.photos/250",
60+
remainingDays: 17,
61+
title: "[양평] 스트로베리 카페",
62+
subtitle: "딸기 음료 2잔",
63+
applicantCount: 100,
64+
totalApplicants: 3,
65+
socialPlatform: .youtube,
66+
reviewPlatform: "카페리뷰"
67+
),
68+
CampaignData(
69+
image: "https://picsum.photos/280",
70+
remainingDays: 3,
71+
title: "[양평] 양평 용기충전 독채 펜션",
72+
subtitle: "펜션 1박 2일",
73+
applicantCount: 80,
74+
totalApplicants: 10,
75+
socialPlatform: .naverBlog,
76+
reviewPlatform: "여행후기"
77+
),
78+
CampaignData(
79+
image: "https://picsum.photos/320",
80+
remainingDays: 15,
81+
title: "[서울] 한강 피크닉 체험",
82+
subtitle: "피크닉 세트",
83+
applicantCount: 67,
84+
totalApplicants: 5,
85+
socialPlatform: .youtube,
86+
reviewPlatform: "서울나들이"
87+
),
88+
CampaignData(
89+
image: "https://picsum.photos/240",
90+
remainingDays: 2,
91+
title: "[부산] 해운대 맛집 투어",
92+
subtitle: "맛집 투어 코스",
93+
applicantCount: 156,
94+
totalApplicants: 12,
95+
socialPlatform: .naverBlog,
96+
reviewPlatform: "부산맛집"
97+
)
98+
]
99+
}

0 commit comments

Comments
 (0)