Skip to content

Commit

Permalink
[Add] #6 - (Reusables) BorderView
Browse files Browse the repository at this point in the history
  • Loading branch information
yurim830 committed Oct 22, 2024
1 parent b218f39 commit 00d03f9
Showing 1 changed file with 34 additions and 8 deletions.
42 changes: 34 additions & 8 deletions 35-seminar/Presentation/Week2/Reusables/BorderView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,41 @@
//

import UIKit
import SnapKit

class BorderView: UIView {

/*
// Only override draw() if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
override func draw(_ rect: CGRect) {
// Drawing code

// MARK: - Properties
let grayLine = UIView()

override init(frame: CGRect) {
super.init(frame: frame)
setUI()
setHierarchy()
setConstraints()
}

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

private func setUI() {
self.backgroundColor = .none
grayLine.backgroundColor = .separator
}

private func setHierarchy() {
self.addSubview(grayLine)
}

private func setConstraints() {
self.snp.makeConstraints {
$0.height.equalTo(1)
}

grayLine.snp.makeConstraints {
$0.height.equalTo(1)
$0.horizontalEdges.equalToSuperview().inset(20)
}
}
*/

}

0 comments on commit 00d03f9

Please sign in to comment.