-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
iOS/issue-tracker/issue-tracker/View/IssueList/AddIssueButton.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
} | ||
} |