File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
iOS/issue-tracker/issue-tracker/View/IssueList Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ //
2+ // AddIssueButton.swift
3+ // issue-tracker
4+ //
5+ // Created by 양준혁 on 2021/06/11.
6+ //
7+
8+ import UIKit
9+
10+ class AddIssueButton : UIView {
11+
12+ override init ( frame: CGRect ) {
13+ super. init ( frame: frame)
14+ setButton ( )
15+ }
16+
17+ required init ? ( coder: NSCoder ) {
18+ super. init ( coder: coder)
19+ }
20+
21+ override func draw( _ rect: CGRect ) {
22+ let path = UIBezierPath ( )
23+
24+ path. move ( to: CGPoint ( x: self . bounds. width * 0.25 , y: self . bounds. height * 0.5 ) )
25+ path. addLine ( to: CGPoint ( x: self . bounds. width * 0.75 , y: self . bounds. height * 0.5 ) )
26+ path. move ( to: CGPoint ( x: self . bounds. width * 0.5 , y: self . bounds. height * 0.25 ) )
27+ path. addLine ( to: CGPoint ( x: self . bounds. width * 0.5 , y: self . bounds. height * 0.75 ) )
28+ UIColor . white. set ( )
29+ path. stroke ( )
30+ }
31+
32+ func setButton( ) {
33+ clipsToBounds = true
34+ layer. cornerRadius = self . bounds. size. width * 0.5
35+ backgroundColor = . systemBlue
36+
37+ }
38+ }
You can’t perform that action at this time.
0 commit comments