From d245f6ef54a3e3733081e62156729e9c65c0ce28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EC=B1=84=EC=9D=80?= Date: Wed, 20 Sep 2023 14:42:01 -0400 Subject: [PATCH] =?UTF-8?q?Refactor=20[#242]=20=EC=B6=94=EC=B2=9C=EC=B9=9C?= =?UTF-8?q?=EA=B5=AC=20BaseVC=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../KakaoFriendViewController.swift | 19 ++------------ .../SchoolFriendViewController.swift | 25 +++---------------- 2 files changed, 5 insertions(+), 39 deletions(-) diff --git a/YELLO-iOS/YELLO-iOS/Presentation/Recommending/Main/ViewController/KakaoFriendViewController.swift b/YELLO-iOS/YELLO-iOS/Presentation/Recommending/Main/ViewController/KakaoFriendViewController.swift index 6b1be80b..b4504b90 100644 --- a/YELLO-iOS/YELLO-iOS/Presentation/Recommending/Main/ViewController/KakaoFriendViewController.swift +++ b/YELLO-iOS/YELLO-iOS/Presentation/Recommending/Main/ViewController/KakaoFriendViewController.swift @@ -11,7 +11,7 @@ import SnapKit import Then import Amplitude -final class KakaoFriendViewController: UIViewController { +final class KakaoFriendViewController: BaseViewController { // MARK: - Variables // MARK: Component @@ -22,24 +22,9 @@ final class KakaoFriendViewController: UIViewController { override func viewDidLoad() { Amplitude.instance().logEvent("view_recommend_kakao") super.viewDidLoad() - setUI() - } -} - -// MARK: - extension -extension KakaoFriendViewController { - - // MARK: Layout Helpers - private func setUI() { - setStyle() - setLayout() - } - - private func setStyle() { - view.backgroundColor = .black } - private func setLayout() { + override func setLayout() { let tabbarHeight = 60 + safeAreaBottomInset() view.addSubview(kakaoFriendView) diff --git a/YELLO-iOS/YELLO-iOS/Presentation/Recommending/Main/ViewController/SchoolFriendViewController.swift b/YELLO-iOS/YELLO-iOS/Presentation/Recommending/Main/ViewController/SchoolFriendViewController.swift index 884bb991..98dabc85 100644 --- a/YELLO-iOS/YELLO-iOS/Presentation/Recommending/Main/ViewController/SchoolFriendViewController.swift +++ b/YELLO-iOS/YELLO-iOS/Presentation/Recommending/Main/ViewController/SchoolFriendViewController.swift @@ -11,40 +11,21 @@ import Amplitude import SnapKit import Then -final class SchoolFriendViewController: UIViewController { +final class SchoolFriendViewController: BaseViewController { // MARK: - Variables // MARK: Component let schoolFriendView = SchoolFriendView() // MARK: - Function - // MARK: LifeCycle - override func viewDidLoad() { - super.viewDidLoad() - setUI() - } - + // MARK: LifeCycle override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(true) Amplitude.instance().logEvent("view_recommend_kakao") schoolFriendView.updateView() } -} - -// MARK: - extension -extension SchoolFriendViewController { - - // MARK: Layout Helpers - private func setUI() { - setStyle() - setLayout() - } - - private func setStyle() { - view.backgroundColor = .black - } - private func setLayout() { + override func setLayout() { let tabbarHeight = 60 + safeAreaBottomInset() view.addSubview(schoolFriendView)