Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update: Resolves #9 #10

Merged
merged 3 commits into from
Jul 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 21 additions & 9 deletions mytine.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,18 @@
0804D25F24B84C5D002D2A12 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0804D25E24B84C5D002D2A12 /* Assets.xcassets */; };
0804D26224B84C5D002D2A12 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0804D26024B84C5D002D2A12 /* LaunchScreen.storyboard */; };
0804D26C24B84FD3002D2A12 /* Home.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0804D26B24B84FD3002D2A12 /* Home.storyboard */; };
0804D27024B850E3002D2A12 /* HomeVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0804D26F24B850E3002D2A12 /* HomeVC.swift */; };
0804D27024B850E3002D2A12 /* CalendarVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0804D26F24B850E3002D2A12 /* CalendarVC.swift */; };
0804D27524B85966002D2A12 /* UITableView+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0804D27424B85966002D2A12 /* UITableView+Extensions.swift */; };
08A3F42724C40CB300201278 /* HomeVC3.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08A3F42624C40CB300201278 /* HomeVC3.swift */; };
08A3F44924C57B1E00201278 /* WeekTVCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08A3F44824C57B1E00201278 /* WeekTVCell.swift */; };
08A3F44B24C57B8B00201278 /* WeekCVCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08A3F44A24C57B8B00201278 /* WeekCVCell.swift */; };
08A3F44D24C58AE400201278 /* HomePopVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08A3F44C24C58AE400201278 /* HomePopVC.swift */; };
08A3F44F24C5D46300201278 /* TabTVCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08A3F44E24C5D46300201278 /* TabTVCell.swift */; };
08A3F45224C5FC3D00201278 /* CheckReusableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08A3F45124C5FC3D00201278 /* CheckReusableView.swift */; };
08D4139C24BF4D410049BB44 /* RoutineTVCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08D4139B24BF4D410049BB44 /* RoutineTVCell.swift */; };
08D4139E24BF4F2C0049BB44 /* UIView+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08D4139D24BF4F2C0049BB44 /* UIView+Extensions.swift */; };
08D413A024BF5DAD0049BB44 /* UIColor+Additions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08D4139F24BF5DAD0049BB44 /* UIColor+Additions.swift */; };
08D413A624C144830049BB44 /* CheckCVCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08D413A524C144830049BB44 /* CheckCVCell.swift */; };
08D413A824C147760049BB44 /* HomeVC2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08D413A724C147760049BB44 /* HomeVC2.swift */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -38,17 +39,18 @@
0804D26124B84C5D002D2A12 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
0804D26324B84C5D002D2A12 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
0804D26B24B84FD3002D2A12 /* Home.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Home.storyboard; sourceTree = "<group>"; };
0804D26F24B850E3002D2A12 /* HomeVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeVC.swift; sourceTree = "<group>"; };
0804D26F24B850E3002D2A12 /* CalendarVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CalendarVC.swift; sourceTree = "<group>"; };
0804D27424B85966002D2A12 /* UITableView+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UITableView+Extensions.swift"; sourceTree = SOURCE_ROOT; };
08A3F42624C40CB300201278 /* HomeVC3.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeVC3.swift; sourceTree = "<group>"; };
08A3F44824C57B1E00201278 /* WeekTVCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WeekTVCell.swift; sourceTree = "<group>"; };
08A3F44A24C57B8B00201278 /* WeekCVCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WeekCVCell.swift; sourceTree = "<group>"; };
08A3F44C24C58AE400201278 /* HomePopVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePopVC.swift; sourceTree = "<group>"; };
08A3F44E24C5D46300201278 /* TabTVCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabTVCell.swift; sourceTree = "<group>"; };
08A3F45124C5FC3D00201278 /* CheckReusableView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckReusableView.swift; sourceTree = "<group>"; };
08D4139B24BF4D410049BB44 /* RoutineTVCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoutineTVCell.swift; sourceTree = "<group>"; };
08D4139D24BF4F2C0049BB44 /* UIView+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+Extensions.swift"; sourceTree = SOURCE_ROOT; };
08D4139F24BF5DAD0049BB44 /* UIColor+Additions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIColor+Additions.swift"; sourceTree = SOURCE_ROOT; };
08D413A524C144830049BB44 /* CheckCVCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckCVCell.swift; sourceTree = "<group>"; };
08D413A724C147760049BB44 /* HomeVC2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeVC2.swift; sourceTree = "<group>"; };
568D2029B4D2C58F7F2D5318 /* Pods-mytine.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-mytine.debug.xcconfig"; path = "Target Support Files/Pods-mytine/Pods-mytine.debug.xcconfig"; sourceTree = "<group>"; };
69B35999940CD37C423E5A5B /* Pods-mytine.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-mytine.release.xcconfig"; path = "Target Support Files/Pods-mytine/Pods-mytine.release.xcconfig"; sourceTree = "<group>"; };
AFDA17E344702CFAAB58362C /* Pods_mytine.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_mytine.framework; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -103,12 +105,12 @@
0804D26924B84FA9002D2A12 /* Sources */ = {
isa = PBXGroup;
children = (
08A3F45024C5F77B00201278 /* Fonts */,
08D4139A24BF4D2B0049BB44 /* Cell */,
0804D26A24B84FB2002D2A12 /* Storyboard */,
0804D26F24B850E3002D2A12 /* HomeVC.swift */,
08D413A724C147760049BB44 /* HomeVC2.swift */,
08A3F44C24C58AE400201278 /* HomePopVC.swift */,
0804D26F24B850E3002D2A12 /* CalendarVC.swift */,
08A3F42624C40CB300201278 /* HomeVC3.swift */,
08A3F44C24C58AE400201278 /* HomePopVC.swift */,
);
path = Sources;
sourceTree = "<group>";
Expand Down Expand Up @@ -139,13 +141,22 @@
name = Extensions;
sourceTree = "<group>";
};
08A3F45024C5F77B00201278 /* Fonts */ = {
isa = PBXGroup;
children = (
);
path = Fonts;
sourceTree = "<group>";
};
08D4139A24BF4D2B0049BB44 /* Cell */ = {
isa = PBXGroup;
children = (
08D4139B24BF4D410049BB44 /* RoutineTVCell.swift */,
08D413A524C144830049BB44 /* CheckCVCell.swift */,
08A3F44824C57B1E00201278 /* WeekTVCell.swift */,
08A3F44A24C57B8B00201278 /* WeekCVCell.swift */,
08A3F44E24C5D46300201278 /* TabTVCell.swift */,
08A3F45124C5FC3D00201278 /* CheckReusableView.swift */,
);
path = Cell;
sourceTree = "<group>";
Expand Down Expand Up @@ -286,16 +297,17 @@
0804D27524B85966002D2A12 /* UITableView+Extensions.swift in Sources */,
08A3F44924C57B1E00201278 /* WeekTVCell.swift in Sources */,
08D413A024BF5DAD0049BB44 /* UIColor+Additions.swift in Sources */,
08A3F44F24C5D46300201278 /* TabTVCell.swift in Sources */,
0804D25A24B84C5B002D2A12 /* ViewController.swift in Sources */,
08A3F44B24C57B8B00201278 /* WeekCVCell.swift in Sources */,
08D4139C24BF4D410049BB44 /* RoutineTVCell.swift in Sources */,
08D413A824C147760049BB44 /* HomeVC2.swift in Sources */,
0804D27024B850E3002D2A12 /* HomeVC.swift in Sources */,
0804D27024B850E3002D2A12 /* CalendarVC.swift in Sources */,
0804D25624B84C5B002D2A12 /* AppDelegate.swift in Sources */,
08A3F44D24C58AE400201278 /* HomePopVC.swift in Sources */,
08D413A624C144830049BB44 /* CheckCVCell.swift in Sources */,
08A3F42724C40CB300201278 /* HomeVC3.swift in Sources */,
0804D25824B84C5B002D2A12 /* SceneDelegate.swift in Sources */,
08A3F45224C5FC3D00201278 /* CheckReusableView.swift in Sources */,
08D4139E24BF4F2C0049BB44 /* UIView+Extensions.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
59 changes: 59 additions & 0 deletions mytine/Sources/CalendarVC.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
//
// CalendarVC.swift
// mytine
//
// Created by 황수빈 on 2020/07/10.
// Copyright © 2020 황수빈. All rights reserved.
//

import UIKit

class CalendarVC: UIViewController {
var months = ["July", "August"]
var numOfDaysInMonth = [31,28,31,30,31,30,31,31,30,31,30,31]
@IBOutlet var calendarCV: UICollectionView!

override func viewDidLoad() {
super.viewDidLoad()
calendarCV.delegate = self
calendarCV.dataSource = self

let dvc = self.storyboard?.instantiateViewController(identifier: "HomeVC3") as! HomeVC3
self.navigationController?.pushViewController(dvc, animated: false)
}
}
extension CalendarVC: UICollectionViewDelegate {

}
extension CalendarVC: UICollectionViewDataSource {
func numberOfSections(in collectionView: UICollectionView) -> Int {
return months.count
}
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
if section == 0 {
return 31
}else {
return 31
}
}

func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "CheckCVCell", for: indexPath) as! CheckCVCell

cell.dataLabel.text = String(indexPath.row+1)
cell.checkLabel.text = "🟢"

return cell
}

func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView {
switch kind {
case UICollectionView.elementKindSectionHeader:
let headerView = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: "CheckReusableView", for: indexPath) as! CheckReusableView
headerView.monthLabel.text = months[indexPath.row]
return headerView
default:
assert(false, "응 아니야")
}
}
}
13 changes: 4 additions & 9 deletions mytine/Sources/Cell/CheckCVCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,13 @@

import UIKit

class CheckCVCell: UITableViewCell {
class CheckCVCell: UICollectionViewCell {

@IBOutlet var checkBtn: [UIButton]!
@IBOutlet var dataLabel: UILabel!
@IBOutlet var checkLabel: UILabel!

override func awakeFromNib() {
super.awakeFromNib()
self.contentView.viewRounded(cornerRadius: 10)
}

override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)

// Configure the view for the selected state
}

}
14 changes: 14 additions & 0 deletions mytine/Sources/Cell/CheckReusableView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// CheckReusableView.swift
// mytine
//
// Created by 황수빈 on 2020/07/21.
// Copyright © 2020 황수빈. All rights reserved.
//

import UIKit

class CheckReusableView: UICollectionReusableView {

@IBOutlet var monthLabel: UILabel!
}
3 changes: 2 additions & 1 deletion mytine/Sources/Cell/RoutineTVCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ import UIKit

class RoutineTVCell: UITableViewCell {

@IBOutlet var backView: UIView!
@IBOutlet var timeLabel: UILabel!
@IBOutlet var iconLabel: UILabel!
@IBOutlet var listLabel: UILabel!

override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
self.backView.viewRounded(cornerRadius: 10)
}

override func setSelected(_ selected: Bool, animated: Bool) {
Expand Down
47 changes: 47 additions & 0 deletions mytine/Sources/Cell/TabTVCell.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
//
// TabTVCell.swift
// mytine
//
// Created by 황수빈 on 2020/07/20.
// Copyright © 2020 황수빈. All rights reserved.
//

import UIKit

class TabTVCell: UITableViewCell {

@IBOutlet var routineBtn: UIButton!
@IBOutlet var reviewBtn: UIButton!
@IBOutlet var barView: UIView!
@IBOutlet var barwidth: NSLayoutConstraint!

override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}

@IBAction func clickRoutine(_ sender: UIButton) {
self.barwidth.constant = self.routineBtn.frame.width
// self.barView.frame.size.width = self.routineBtn.frame.width
UIView.animate(withDuration: 0.3, delay: 0, options: .curveEaseInOut, animations: {
self.routineBtn.isSelected = true
self.reviewBtn.isSelected = false
self.barView.frame.size.width = self.routineBtn.frame.width
self.barView.transform = CGAffineTransform(translationX: 0, y: 0)
})
self.layoutIfNeeded()
}

@IBAction func clickReview(_ sender: UIButton) {
self.barwidth.constant = self.reviewBtn.frame.width
// self.barView.frame.size.width = self.reviewBtn.frame.width
UIView.animate(withDuration: 0.3, delay: 0, options: .curveEaseInOut, animations: {
self.routineBtn.isSelected = false
self.reviewBtn.isSelected = true
self.barView.frame.size.width = self.reviewBtn.frame.width
self.barView.transform = CGAffineTransform(translationX: sender.frame.width, y: 0)
})

self.layoutIfNeeded()
}
}
Binary file added mytine/Sources/Fonts/Montserrat-Bold.ttf
Binary file not shown.
Binary file added mytine/Sources/Fonts/Montserrat-Regular.ttf
Binary file not shown.
125 changes: 0 additions & 125 deletions mytine/Sources/HomeVC.swift

This file was deleted.

Loading