-
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.
Merge branch 'iOS/feature/#27/IssueList'
Conflicts: iOS/issue-tracker/issue-tracker.xcodeproj/project.pbxproj
- Loading branch information
Showing
17 changed files
with
764 additions
and
145 deletions.
There are no files selected for viewing
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,43 @@ | ||
// | ||
// LabelsCollectionViewCell.swift | ||
// issue-tracker | ||
// | ||
// Created by 양준혁 on 2021/06/13. | ||
// | ||
|
||
import UIKit | ||
import SnapKit | ||
|
||
class LabelsCollectionViewCell: UICollectionViewCell { | ||
static var identifiers = "LabelsCollectionViewCell" | ||
|
||
let label: PaddingLabel = { | ||
var label = PaddingLabel(withInsets: 0, 0, 10, 10) | ||
label.textAlignment = .center | ||
label.textColor = .white | ||
label.layer.masksToBounds = true | ||
label.layer.cornerRadius = 15 | ||
return label | ||
}() | ||
|
||
override init(frame: CGRect) { | ||
super.init(frame: frame) | ||
addSubview(label) | ||
setAutolayout() | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
super.init(coder: coder) | ||
} | ||
|
||
func setAutolayout() { | ||
label.snp.makeConstraints { label in | ||
label.edges.equalToSuperview() | ||
} | ||
} | ||
|
||
func configure(title: String, color: String) { | ||
label.text = title | ||
label.backgroundColor = UIColor.hexStringToUIColor(hex: color) | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
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
41 changes: 41 additions & 0 deletions
41
iOS/issue-tracker/issue-tracker/Controller/IssueTableFooterView.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,41 @@ | ||
// | ||
// IssueTableFooterView.swift | ||
// issue-tracker | ||
// | ||
// Created by 양준혁 on 2021/06/10. | ||
// | ||
|
||
import UIKit | ||
import SnapKit | ||
|
||
class IssueTableFooterView: UIView { | ||
|
||
var label: UILabel = { | ||
var label = UILabel() | ||
label.text = "아래로 당기면 검색바가 보여요!👀" | ||
label.textColor = .lightGray | ||
return label | ||
}() | ||
|
||
override init(frame: CGRect) { | ||
super.init(frame: frame) | ||
backgroundColor = #colorLiteral(red: 0.9489405751, green: 0.9490727782, blue: 0.9685038924, alpha: 1) | ||
addSubview(label) | ||
setAutolayout() | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
super.init(coder: coder) | ||
backgroundColor = #colorLiteral(red: 0.9489405751, green: 0.9490727782, blue: 0.9685038924, alpha: 1) | ||
addSubview(label) | ||
setAutolayout() | ||
} | ||
|
||
func setAutolayout() { | ||
label.snp.makeConstraints { label in | ||
label.centerX.equalToSuperview() | ||
label.top.equalTo(39) | ||
} | ||
} | ||
|
||
} |
64 changes: 64 additions & 0 deletions
64
iOS/issue-tracker/issue-tracker/Controller/IssueToolbar.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,64 @@ | ||
// | ||
// IssueToolbar.swift | ||
// issue-tracker | ||
// | ||
// Created by 양준혁 on 2021/06/11. | ||
// | ||
|
||
import UIKit | ||
|
||
class IssueToolbar: UIToolbar { | ||
|
||
let checkBoxBarButtonItem: UIBarButtonItem = { | ||
var item = UIBarButtonItem() | ||
item.image = UIImage(systemName: "checkmark.circle") | ||
|
||
return item | ||
}() | ||
|
||
let closeIssueBarButtonItem: UIBarButtonItem = { | ||
var item = UIBarButtonItem() | ||
item.image = UIImage(systemName: "archivebox") | ||
return item | ||
}() | ||
|
||
let labelBarButtonItem: UIBarButtonItem = { | ||
var item = UIBarButtonItem() | ||
item.title = "이슈를 선택하세요" | ||
item.isEnabled = false | ||
return item | ||
}() | ||
|
||
let flexibleBarButtonItem: UIBarButtonItem = { | ||
var item = UIBarButtonItem(barButtonSystemItem: .flexibleSpace, target: nil, action: nil) | ||
return item | ||
}() | ||
|
||
override init(frame: CGRect) { | ||
super.init(frame: frame) | ||
setToolbar() | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
super.init(coder: coder) | ||
setToolbar() | ||
} | ||
|
||
func setToolbar() { | ||
let items = [checkBoxBarButtonItem, flexibleBarButtonItem, labelBarButtonItem, flexibleBarButtonItem, closeIssueBarButtonItem] | ||
setItems(items, animated: false) | ||
|
||
} | ||
|
||
func setCheckMode(count: Int) { | ||
checkBoxBarButtonItem.image = UIImage(systemName: "checkmark.circle") | ||
labelBarButtonItem.title = "\(count)개의 이슈가 선택됨" | ||
labelBarButtonItem.tintColor = .black | ||
} | ||
|
||
func setUncheckMode() { | ||
checkBoxBarButtonItem.image = UIImage(systemName: "checkmark.circle.fill") | ||
labelBarButtonItem.title = "이슈를 선택하세요" | ||
labelBarButtonItem.tintColor = .lightGray | ||
} | ||
} |
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
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 | ||
|
||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
iOS/issue-tracker/issue-tracker/View/IssueList/CancelButton.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,20 @@ | ||
// | ||
// CancelButton.swift | ||
// issue-tracker | ||
// | ||
// Created by 양준혁 on 2021/06/11. | ||
// | ||
|
||
import UIKit | ||
|
||
class CancelButton: UIButton { | ||
override init(frame: CGRect) { | ||
super.init(frame: frame) | ||
setTitle("취소", for: .normal) | ||
setTitleColor(.systemBlue, for: .normal) | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
fatalError("init(coder:) has not been implemented") | ||
} | ||
} |
Oops, something went wrong.