From b53b4f1762543a795afb56a614b0a9af4251d59b Mon Sep 17 00:00:00 2001
From: sujeong lim <20180998@sungshin.ac.kr>
Date: Mon, 22 Nov 2021 15:22:34 +0900
Subject: [PATCH] =?UTF-8?q?Feat:=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=88=98?=
=?UTF-8?q?=EC=A0=95=20UI=20=EC=A0=81=EC=9A=A9=20#7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Views/Create/Create.storyboard | 16 +-
.../Views/Page/EditPage.storyboard | 160 +++++++++---------
.../Storizy-iOS/Views/Page/EditPageVC.swift | 69 +++++++-
3 files changed, 150 insertions(+), 95 deletions(-)
diff --git a/Storizy-iOS/Storizy-iOS/Views/Create/Create.storyboard b/Storizy-iOS/Storizy-iOS/Views/Create/Create.storyboard
index 43e4607..3862432 100644
--- a/Storizy-iOS/Storizy-iOS/Views/Create/Create.storyboard
+++ b/Storizy-iOS/Storizy-iOS/Views/Create/Create.storyboard
@@ -394,7 +394,7 @@
-
+
@@ -403,14 +403,14 @@
-
+
@@ -418,7 +418,7 @@
-
+
@@ -426,7 +426,7 @@
-
+
@@ -467,7 +467,7 @@
-
+
Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda.
@@ -539,14 +539,14 @@
-
+
-
+
diff --git a/Storizy-iOS/Storizy-iOS/Views/Page/EditPage.storyboard b/Storizy-iOS/Storizy-iOS/Views/Page/EditPage.storyboard
index 95c926d..053882b 100644
--- a/Storizy-iOS/Storizy-iOS/Views/Page/EditPage.storyboard
+++ b/Storizy-iOS/Storizy-iOS/Views/Page/EditPage.storyboard
@@ -4,6 +4,7 @@
+
@@ -19,16 +20,16 @@
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
+
-
+
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
@@ -113,65 +107,64 @@
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda.
-
-
+
+
-
+
-
+
+
-
-
+
+
-
+
-
+
-
-
+
+
-
+
-
+
@@ -195,48 +188,48 @@
-
+
-
-
+
-
+
-
-
-
+
+
+
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
+
+
+
+
+
-
+
-
+
+
+
+
+
+
+
@@ -248,12 +241,15 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/Storizy-iOS/Storizy-iOS/Views/Page/EditPageVC.swift b/Storizy-iOS/Storizy-iOS/Views/Page/EditPageVC.swift
index 92eefdc..1547872 100644
--- a/Storizy-iOS/Storizy-iOS/Views/Page/EditPageVC.swift
+++ b/Storizy-iOS/Storizy-iOS/Views/Page/EditPageVC.swift
@@ -9,10 +9,20 @@ import UIKit
class EditPageVC: UIViewController {
- @IBOutlet weak var imageCollectionView: UICollectionView!
+ @IBOutlet weak var headBarView: UIView!
+ @IBOutlet weak var projectTitleTF: UITextField!
+ @IBOutlet weak var titleTF: UITextField!
+ @IBOutlet weak var tagCV: UICollectionView!
+ @IBOutlet weak var contentTV: UITextView!
+ @IBOutlet weak var imageCV: UICollectionView!
+ @IBOutlet weak var doneBTN: UIButton!
+
+ var tags: [String] = ["러시아워","유기현최고"]
override func viewDidLoad() {
super.viewDidLoad()
+ setUI()
+ registerNib()
}
@@ -26,19 +36,68 @@ class EditPageVC: UIViewController {
self.navigationController?.popViewController(animated: true)
}
+
+ // MARK: - Nib
+ func registerNib(){
+ let storyTagNibName = UINib(nibName: "StoryTagCell", bundle: nil)
+ tagCV.register(storyTagNibName, forCellWithReuseIdentifier: "StoryTagCell")
+ }
+
+ // MARK: - UI
+ func frameUI(_ view: T){
+ view.layer.cornerRadius = 12
+ view.layer.borderWidth = 1
+ view.layer.borderColor = UIColor(named: "light_gray2")?.cgColor
+ view.clipsToBounds = true
+ }
+
+ func setUI(){
+ // 헤더 그림자
+ headBarView.layer.shadowOffset = CGSize(width: 0, height: 0)
+ headBarView.layer.shadowRadius = 6
+ headBarView.layer.shadowOpacity = 1
+ headBarView.layer.shadowColor = UIColor(red: 0.2, green: 0.2, blue: 0.2, alpha: 0.1).cgColor
+ // 입력 칸 테두리
+ frameUI(projectTitleTF)
+ frameUI(titleTF)
+ // 내용 칸
+ contentTV.layer.cornerRadius = 12
+ contentTV.textContainerInset = UIEdgeInsets(top: 12, left: 6,bottom: 12,right: 12)
+ // 완료 버튼
+ doneBTN.layer.cornerRadius = 12
+ }
+
}
// 이미지 collection view
extension EditPageVC: UICollectionViewDelegate, UICollectionViewDataSource {
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
- return 5
+ // 이미지
+ if collectionView == imageCV {
+ return 5
+ }
+ // 태그
+ else {
+ return tags.count
+ }
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
- let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "imgCell", for: indexPath) as! ImgCell
- // 이미지 등록
- return cell
+ // 이미지
+ if collectionView == imageCV {
+ let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "ImgCell", for: indexPath) as! ImgCell
+ cell.imageView.layer.cornerRadius = 10
+ return cell
+ }
+ // 태그
+ else {
+ let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "StoryTagCell", for: indexPath) as! StoryTagCell
+ cell.tagNameLB.text = tags[indexPath.item]
+ cell.frameView.backgroundColor = UIColor(named: "tag_yellow-light")
+ cell.tagNameLB.textColor = UIColor(named: "tag_yellow")
+ return cell
+ }
}