Skip to content

Commit

Permalink
Refactor [#242] BaseView로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
chaentopia committed Oct 1, 2023
1 parent 9c09ade commit 058f30a
Showing 1 changed file with 3 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Amplitude
import SnapKit
import Then

final class EmptyFriendView: UIView {
final class EmptyFriendView: BaseView {

// MARK: - Variables
// MARK: Component
Expand All @@ -24,29 +24,8 @@ final class EmptyFriendView: UIView {
private var invitingView = InvitingView()

// MARK: - Function
// MARK: LifeCycle
override init(frame: CGRect) {
super.init(frame: frame)
setUI()
}

@available(*, unavailable)
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}

// MARK: - extension
extension EmptyFriendView {

// MARK: Layout Helpers
private func setUI() {
invitingView = InvitingView()
setStyle()
setLayout()
}

private func setStyle() {
override func setStyle() {
self.backgroundColor = .black
emptyImageView.do {
$0.image = ImageLiterals.Recommending.imgBannerInvite
Expand All @@ -70,7 +49,7 @@ extension EmptyFriendView {
}
}

private func setLayout() {
override func setLayout() {
self.addSubview(containView)
containView.addSubviews(emptyImageView,
emptyDescriptionLabel,
Expand Down Expand Up @@ -135,6 +114,5 @@ extension EmptyFriendView {
}

Amplitude.instance().logEvent("click_invite", withEventProperties: ["invite_view": keyValue])

}
}

0 comments on commit 058f30a

Please sign in to comment.