From e5f81d2035f04b17dfaa453a52a9c45e31f71773 Mon Sep 17 00:00:00 2001 From: kpk0616 Date: Fri, 13 Jan 2023 23:39:42 +0900 Subject: [PATCH] =?UTF-8?q?[Feat]=20#46=20-=20=ED=99=88=EB=B7=B0=20?= =?UTF-8?q?=EC=84=B8=EA=B7=B8=EB=A9=98=ED=8B=B0=EB=93=9C=EC=BB=A8=ED=8A=B8?= =?UTF-8?q?=EB=A1=A4=20=EB=B0=94=EB=80=94=20=EB=95=8C=EB=A7=88=EB=8B=A4=20?= =?UTF-8?q?reload?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Tab/Home/Controllers/HomeViewController.swift | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Keyneez/Keyneez/Tab/Home/Controllers/HomeViewController.swift b/Keyneez/Keyneez/Tab/Home/Controllers/HomeViewController.swift index 9d6612e..3734db9 100644 --- a/Keyneez/Keyneez/Tab/Home/Controllers/HomeViewController.swift +++ b/Keyneez/Keyneez/Tab/Home/Controllers/HomeViewController.swift @@ -94,6 +94,18 @@ extension HomeViewController { @objc private func changeUnderLinePosition() { animateUnderline() changeViewControllers() + guard let token = UserSession.shared.accessToken else { return } + repository.getAllContents(token: token) { + [weak self] arr in + guard let self else {return} + self.datasources.append(arr) + DispatchQueue.main.async { + self.VCs.forEach { + $0.contentList = self.datasources[0] + $0.recommendContentCollectionView.reloadData() + } + } + } } private func animateUnderline() { let segmentIndex = segmentControl.selectedSegmentIndex