Skip to content

Commit

Permalink
feat: ✨ AddIssueButton 구현 (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
zekexros committed Jun 11, 2021
1 parent 5c87910 commit 6ec6a5d
Showing 1 changed file with 38 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
//
// AddIssueButton.swift
// issue-tracker
//
// Created by 양준혁 on 2021/06/11.
//

import UIKit

class AddIssueButton: UIView {

override init(frame: CGRect) {
super.init(frame: frame)
setButton()
}

required init?(coder: NSCoder) {
super.init(coder: coder)
}

override func draw(_ rect: CGRect) {
let path = UIBezierPath()

path.move(to: CGPoint(x: self.bounds.width * 0.25, y: self.bounds.height * 0.5))
path.addLine(to: CGPoint(x: self.bounds.width * 0.75, y: self.bounds.height * 0.5))
path.move(to: CGPoint(x: self.bounds.width * 0.5, y: self.bounds.height * 0.25))
path.addLine(to: CGPoint(x: self.bounds.width * 0.5, y: self.bounds.height * 0.75))
UIColor.white.set()
path.stroke()
}

func setButton() {
clipsToBounds = true
layer.cornerRadius = self.bounds.size.width * 0.5
backgroundColor = .systemBlue

}
}

0 comments on commit 6ec6a5d

Please sign in to comment.