Skip to content

Commit

Permalink
Merge branch 'iOS/feature/#27/IssueList'
Browse files Browse the repository at this point in the history
Conflicts:
	iOS/issue-tracker/issue-tracker.xcodeproj/project.pbxproj
  • Loading branch information
zekexros committed Jun 14, 2021
2 parents 6c620f7 + 46e4494 commit ae818e3
Show file tree
Hide file tree
Showing 17 changed files with 764 additions and 145 deletions.
43 changes: 43 additions & 0 deletions iOS/issue-tracker/LabelsCollectionViewCell.swift
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)
}
}
64 changes: 56 additions & 8 deletions iOS/issue-tracker/issue-tracker.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

81 changes: 67 additions & 14 deletions iOS/issue-tracker/issue-tracker/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="ztH-lY-X3Y">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="18122" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="ztH-lY-X3Y">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="18093"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
Expand Down Expand Up @@ -37,23 +37,38 @@
</objects>
<point key="canvasLocation" x="-632" y="238"/>
</scene>
<!--이슈-->
<!--Issue List View Controller-->
<scene sceneID="f3p-9R-hjs">
<objects>
<viewController id="oTI-da-eDR" sceneMemberID="viewController">
<viewController id="oTI-da-eDR" customClass="IssueListViewController" customModule="issue_tracker" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="e9G-As-1Ly">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="300" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="oU9-yx-qTd">
<rect key="frame" x="0.0" y="88" width="414" height="725"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
</tableView>
</subviews>
<viewLayoutGuide key="safeArea" id="y9l-Qc-QqU"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="oU9-yx-qTd" firstAttribute="leading" secondItem="y9l-Qc-QqU" secondAttribute="leading" id="5GG-x3-eF8"/>
<constraint firstItem="oU9-yx-qTd" firstAttribute="top" secondItem="y9l-Qc-QqU" secondAttribute="top" id="68q-pE-jgZ"/>
<constraint firstItem="y9l-Qc-QqU" firstAttribute="trailing" secondItem="oU9-yx-qTd" secondAttribute="trailing" id="FKS-7O-uGe"/>
<constraint firstItem="y9l-Qc-QqU" firstAttribute="bottom" secondItem="oU9-yx-qTd" secondAttribute="bottom" id="gAn-Xe-pob"/>
</constraints>
</view>
<tabBarItem key="tabBarItem" title="이슈" image="exclamationmark.circle" catalog="system" id="goh-EH-LxE"/>
<navigationItem key="navigationItem" id="U4K-1F-xyh"/>
<connections>
<outlet property="issueTableView" destination="oU9-yx-qTd" id="eMI-5k-3kH"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="elB-mf-Nih" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="249" y="793"/>
<point key="canvasLocation" x="228.98550724637684" y="1516.7410714285713"/>
</scene>
<!--레이블-->
<!--Label View Controller-->
<scene sceneID="SuD-oH-C9C">
<objects>
<viewController id="dsf-nF-ec5" customClass="LabelViewController" customModule="issue_tracker" customModuleProvider="target" sceneMemberID="viewController">
Expand All @@ -75,14 +90,14 @@
<constraint firstItem="HEu-i9-bYg" firstAttribute="top" secondItem="aEd-FN-64U" secondAttribute="top" id="vxU-Vr-Fwg"/>
</constraints>
</view>
<tabBarItem key="tabBarItem" title="레이블" image="tag" catalog="system" id="icm-rA-6fv"/>
<navigationItem key="navigationItem" id="yVl-u9-CF2"/>
<connections>
<outlet property="labelTableView" destination="HEu-i9-bYg" id="R20-IQ-0Wm"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="IGg-E4-hvo" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1019" y="793"/>
<point key="canvasLocation" x="1109" y="1517"/>
</scene>
<!--내게정-->
<scene sceneID="CPO-fU-AJO">
Expand All @@ -98,7 +113,7 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="vTy-kJ-ZF8" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="3072" y="793"/>
<point key="canvasLocation" x="2901" y="793"/>
</scene>
<!--Milestone View Controller-->
<scene sceneID="f18-5Z-nm8">
Expand All @@ -114,7 +129,7 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="1rW-Zv-Ixr" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2417" y="793"/>
<point key="canvasLocation" x="2003" y="1517"/>
</scene>
<!--Tab Bar Controller-->
<scene sceneID="pYl-ZN-vsk">
Expand All @@ -127,8 +142,8 @@
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</tabBar>
<connections>
<segue destination="oTI-da-eDR" kind="relationship" relationship="viewControllers" id="Fb5-vw-YJJ"/>
<segue destination="dsf-nF-ec5" kind="relationship" relationship="viewControllers" id="U3N-hc-L3l"/>
<segue destination="Qvp-6m-CSb" kind="relationship" relationship="viewControllers" id="Fb5-vw-YJJ"/>
<segue destination="eWZ-ol-nCj" kind="relationship" relationship="viewControllers" id="U3N-hc-L3l"/>
<segue destination="g0q-18-mPP" kind="relationship" relationship="viewControllers" id="DK5-w3-R3k"/>
<segue destination="cxD-Kl-bEy" kind="relationship" relationship="viewControllers" id="HpJ-9s-VRl"/>
</connections>
Expand All @@ -154,7 +169,45 @@
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="f25-i6-ILh" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1737.68115942029" y="792.85714285714278"/>
<point key="canvasLocation" x="2003" y="793"/>
</scene>
<!--이슈-->
<scene sceneID="MEh-c2-Sua">
<objects>
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="Qvp-6m-CSb" sceneMemberID="viewController">
<tabBarItem key="tabBarItem" title="이슈" image="exclamationmark.circle" catalog="system" id="goh-EH-LxE"/>
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" id="xdp-e7-356">
<rect key="frame" x="0.0" y="44" width="414" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<nil name="viewControllers"/>
<connections>
<segue destination="oTI-da-eDR" kind="relationship" relationship="rootViewController" id="zCG-iI-jnM"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="QwI-Yz-8CA" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="228.98550724637684" y="792.85714285714278"/>
</scene>
<!--레이블-->
<scene sceneID="8Wg-oP-tNJ">
<objects>
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="eWZ-ol-nCj" sceneMemberID="viewController">
<tabBarItem key="tabBarItem" title="레이블" image="tag" catalog="system" id="icm-rA-6fv"/>
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" id="S0T-lX-QCh">
<rect key="frame" x="0.0" y="44" width="414" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<nil name="viewControllers"/>
<connections>
<segue destination="dsf-nF-ec5" kind="relationship" relationship="rootViewController" id="h5I-2M-chU"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="IGN-HS-gnx" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1108.6956521739132" y="792.85714285714278"/>
</scene>
</scenes>
<resources>
Expand Down
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 iOS/issue-tracker/issue-tracker/Controller/IssueToolbar.swift
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
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,26 @@ class LabelViewController: UIViewController {

@IBOutlet weak var labelTableView: UITableView!

lazy var tableHeaderView = LabelTabelHeaderView(frame: CGRect(x: 0, y: 0, width: self.view.frame.size.width, height: 140))
var addLabelButton = AddLabelButton()

let fakeData = [Label(title: "hidsfadsfsafasfdfadsf", description: "hello", color: "#B1CAE5"), Label(title: "wow", description: "amazing", color: "#DFCD85")]

override func viewDidLoad() {
super.viewDidLoad()
setNavigationBar()
labelTableView.register(LabelTableViewCell.self, forCellReuseIdentifier: LabelTableViewCell.identifier)
labelTableView.dataSource = self
labelTableView.tableHeaderView = tableHeaderView
addLabelButton.addTarget(self, action: #selector(addLabelButtonTapped), for: .touchUpInside)
}

@objc func addLabelButtonTapped() {

}

func setNavigationBar() {
navigationController?.navigationBar.prefersLargeTitles = true
navigationItem.title = "레이블"
navigationItem.rightBarButtonItem = UIBarButtonItem(customView: addLabelButton)
}
}

Expand Down
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 iOS/issue-tracker/issue-tracker/View/IssueList/CancelButton.swift
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")
}
}
Loading

0 comments on commit ae818e3

Please sign in to comment.