Skip to content

Commit

Permalink
[feat] ActionBottomView 추가 (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
BAEKYUJEONG committed Aug 18, 2024
1 parent 3009b15 commit c097758
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions PLUV/Component/ActionBottomView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
//
// ActionBottomView.swift
// PLUV
//
// Created by 백유정 on 8/19/24.
//

import UIKit

final class ActionBottomView: UIView {

var lineView = UIView()
var actionButton = BlackButton()

init(actionName: String) {
super.init(frame: .zero)
setUI(buttonText: actionName)
}

required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}

func setUI(buttonText: String) {
self.backgroundColor = .white

self.addSubview(lineView)
self.lineView.backgroundColor = .gray200
lineView.snp.makeConstraints { make in
make.leading.trailing.top.equalToSuperview()
make.height.equalTo(1)
}

self.addSubview(actionButton)
self.actionButton.setTitle(buttonText, for: .normal)
actionButton.snp.makeConstraints { make in
make.top.equalToSuperview().offset(11)
make.leading.equalToSuperview().offset(24)
make.trailing.equalToSuperview().inset(24)
make.height.equalTo(58)
}

shadow()
}

func shadow() {
self.layer.shadowColor = UIColor.shadow.cgColor
self.layer.shadowOpacity = 1
self.layer.shadowOffset = CGSize(width: 0, height: -2)
}
}

0 comments on commit c097758

Please sign in to comment.