Skip to content

Commit

Permalink
Refactor [#242] 추천친구 BaseVC 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
chaentopia committed Sep 20, 2023
1 parent 34153b0 commit d245f6e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import SnapKit
import Then
import Amplitude

final class KakaoFriendViewController: UIViewController {
final class KakaoFriendViewController: BaseViewController {

// MARK: - Variables
// MARK: Component
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d245f6e

Please sign in to comment.