From e93d781595e192edece61f23035ef6a6fa64d2ee Mon Sep 17 00:00:00 2001 From: dohan Date: Wed, 7 Jul 2021 23:52:02 +0900 Subject: [PATCH 1/2] =?UTF-8?q?[refac]=20=ED=85=8C=EC=9D=B4=EB=B8=94?= =?UTF-8?q?=EB=B7=B0=20=EB=8D=B0=EC=9D=B4=ED=84=B0=20=EC=97=86=EC=9D=84=20?= =?UTF-8?q?=EB=95=8C=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MainHome/Storyboard/MainHome.storyboard | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/WeekFlex/WeekFlex/Screen/MainHome/Storyboard/MainHome.storyboard b/WeekFlex/WeekFlex/Screen/MainHome/Storyboard/MainHome.storyboard index dfb2bd2..ae929b1 100644 --- a/WeekFlex/WeekFlex/Screen/MainHome/Storyboard/MainHome.storyboard +++ b/WeekFlex/WeekFlex/Screen/MainHome/Storyboard/MainHome.storyboard @@ -46,6 +46,31 @@ + @@ -213,6 +238,7 @@ + @@ -220,10 +246,13 @@ + + + @@ -353,6 +382,7 @@ + From 112e093ab873ba1fec451587c571281d82b9179e Mon Sep 17 00:00:00 2001 From: dohan Date: Fri, 9 Jul 2021 21:04:39 +0900 Subject: [PATCH 2/2] =?UTF-8?q?[refac]=20=EB=8D=B0=EC=9D=B4=ED=84=B0=20?= =?UTF-8?q?=EC=97=86=EC=9D=84=20=EB=95=8C=20=ED=9E=88=EB=93=A0=20=EB=B7=B0?= =?UTF-8?q?=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WeekFlex/WeekFlex/Info.plist | 2 +- .../Screen/MainHome/Storyboard/MainHome.storyboard | 1 + .../Screen/MainHome/ViewController/MainHomeVC.swift | 8 ++++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/WeekFlex/WeekFlex/Info.plist b/WeekFlex/WeekFlex/Info.plist index 0adde5b..06cb3d1 100644 --- a/WeekFlex/WeekFlex/Info.plist +++ b/WeekFlex/WeekFlex/Info.plist @@ -46,7 +46,7 @@ UISceneDelegateClassName $(PRODUCT_MODULE_NAME).SceneDelegate UISceneStoryboardFile - Review + MainHome diff --git a/WeekFlex/WeekFlex/Screen/MainHome/Storyboard/MainHome.storyboard b/WeekFlex/WeekFlex/Screen/MainHome/Storyboard/MainHome.storyboard index ae929b1..bfced92 100644 --- a/WeekFlex/WeekFlex/Screen/MainHome/Storyboard/MainHome.storyboard +++ b/WeekFlex/WeekFlex/Screen/MainHome/Storyboard/MainHome.storyboard @@ -266,6 +266,7 @@ + diff --git a/WeekFlex/WeekFlex/Screen/MainHome/ViewController/MainHomeVC.swift b/WeekFlex/WeekFlex/Screen/MainHome/ViewController/MainHomeVC.swift index 42a895b..e2f712b 100644 --- a/WeekFlex/WeekFlex/Screen/MainHome/ViewController/MainHomeVC.swift +++ b/WeekFlex/WeekFlex/Screen/MainHome/ViewController/MainHomeVC.swift @@ -56,6 +56,7 @@ class MainHomeVC: UIViewController { @IBOutlet weak var calendarCollectionView: UICollectionView! @IBOutlet weak var todayLabel: UILabel! + @IBOutlet weak var noDataView: UIView! @IBOutlet weak var tableView: UITableView! @@ -123,6 +124,13 @@ extension MainHomeVC: UITableViewDataSource,UITableViewDelegate { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + if mainViewModel.lists[currentDay].routines.count == 0 { + tableView.isHidden = true + noDataView.isHidden = false + + return 0 + } + return mainViewModel.lists[currentDay].routines.count }