diff --git a/mytine.xcodeproj/project.pbxproj b/mytine.xcodeproj/project.pbxproj index 8541da8..6371f79 100644 --- a/mytine.xcodeproj/project.pbxproj +++ b/mytine.xcodeproj/project.pbxproj @@ -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 */ @@ -38,17 +39,18 @@ 0804D26124B84C5D002D2A12 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 0804D26324B84C5D002D2A12 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 0804D26B24B84FD3002D2A12 /* Home.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Home.storyboard; sourceTree = ""; }; - 0804D26F24B850E3002D2A12 /* HomeVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeVC.swift; sourceTree = ""; }; + 0804D26F24B850E3002D2A12 /* CalendarVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CalendarVC.swift; sourceTree = ""; }; 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 = ""; }; 08A3F44824C57B1E00201278 /* WeekTVCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WeekTVCell.swift; sourceTree = ""; }; 08A3F44A24C57B8B00201278 /* WeekCVCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WeekCVCell.swift; sourceTree = ""; }; 08A3F44C24C58AE400201278 /* HomePopVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePopVC.swift; sourceTree = ""; }; + 08A3F44E24C5D46300201278 /* TabTVCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabTVCell.swift; sourceTree = ""; }; + 08A3F45124C5FC3D00201278 /* CheckReusableView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckReusableView.swift; sourceTree = ""; }; 08D4139B24BF4D410049BB44 /* RoutineTVCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoutineTVCell.swift; sourceTree = ""; }; 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 = ""; }; - 08D413A724C147760049BB44 /* HomeVC2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeVC2.swift; sourceTree = ""; }; 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 = ""; }; 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 = ""; }; AFDA17E344702CFAAB58362C /* Pods_mytine.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_mytine.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -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 = ""; @@ -139,6 +141,13 @@ name = Extensions; sourceTree = ""; }; + 08A3F45024C5F77B00201278 /* Fonts */ = { + isa = PBXGroup; + children = ( + ); + path = Fonts; + sourceTree = ""; + }; 08D4139A24BF4D2B0049BB44 /* Cell */ = { isa = PBXGroup; children = ( @@ -146,6 +155,8 @@ 08D413A524C144830049BB44 /* CheckCVCell.swift */, 08A3F44824C57B1E00201278 /* WeekTVCell.swift */, 08A3F44A24C57B8B00201278 /* WeekCVCell.swift */, + 08A3F44E24C5D46300201278 /* TabTVCell.swift */, + 08A3F45124C5FC3D00201278 /* CheckReusableView.swift */, ); path = Cell; sourceTree = ""; @@ -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; diff --git a/mytine/Sources/CalendarVC.swift b/mytine/Sources/CalendarVC.swift new file mode 100644 index 0000000..8ee6956 --- /dev/null +++ b/mytine/Sources/CalendarVC.swift @@ -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, "응 아니야") + } + } +} diff --git a/mytine/Sources/Cell/CheckCVCell.swift b/mytine/Sources/Cell/CheckCVCell.swift index 7e123c0..4025812 100644 --- a/mytine/Sources/Cell/CheckCVCell.swift +++ b/mytine/Sources/Cell/CheckCVCell.swift @@ -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 - } - } diff --git a/mytine/Sources/Cell/CheckReusableView.swift b/mytine/Sources/Cell/CheckReusableView.swift new file mode 100644 index 0000000..99d8cf5 --- /dev/null +++ b/mytine/Sources/Cell/CheckReusableView.swift @@ -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! +} diff --git a/mytine/Sources/Cell/RoutineTVCell.swift b/mytine/Sources/Cell/RoutineTVCell.swift index a800f2d..296c85d 100644 --- a/mytine/Sources/Cell/RoutineTVCell.swift +++ b/mytine/Sources/Cell/RoutineTVCell.swift @@ -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) { diff --git a/mytine/Sources/Cell/TabTVCell.swift b/mytine/Sources/Cell/TabTVCell.swift new file mode 100644 index 0000000..4a6f9f0 --- /dev/null +++ b/mytine/Sources/Cell/TabTVCell.swift @@ -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() + } +} diff --git a/mytine/Sources/Fonts/Montserrat-Bold.ttf b/mytine/Sources/Fonts/Montserrat-Bold.ttf new file mode 100755 index 0000000..221819b Binary files /dev/null and b/mytine/Sources/Fonts/Montserrat-Bold.ttf differ diff --git a/mytine/Sources/Fonts/Montserrat-Regular.ttf b/mytine/Sources/Fonts/Montserrat-Regular.ttf new file mode 100755 index 0000000..8d443d5 Binary files /dev/null and b/mytine/Sources/Fonts/Montserrat-Regular.ttf differ diff --git a/mytine/Sources/HomeVC.swift b/mytine/Sources/HomeVC.swift deleted file mode 100644 index c9c3825..0000000 --- a/mytine/Sources/HomeVC.swift +++ /dev/null @@ -1,125 +0,0 @@ -// -// HomeVC.swift -// mytine -// -// Created by 황수빈 on 2020/07/10. -// Copyright © 2020 황수빈. All rights reserved. -// - -import UIKit - -class HomeVC: UIViewController { - var routineList = ["혜연 케어", "애리 케어", "재환 케어", "승희 케어", "유진 케어", "수빈 케어", "남수 케어"] - var monthList = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"] - var todayData = 15 - @IBOutlet var routineCV: UICollectionView! - @IBOutlet var routineTV: UITableView! - @IBOutlet var day1Label: UILabel! - @IBOutlet var day2Label: UILabel! - @IBOutlet var day3Label: UILabel! - @IBOutlet var day4Label: UILabel! - @IBOutlet var day5Label: UILabel! - @IBOutlet var day6Label: UILabel! - @IBOutlet var day7Label: UILabel! - @IBOutlet var collectionViewHeight: NSLayoutConstraint! - @IBOutlet var tableViewHeight: NSLayoutConstraint! - - override func viewDidLoad() { - super.viewDidLoad() - routineCV.dataSource = self - routineTV.dataSource = self - routineTV.delegate = self - setUI() - collectionViewHeight.constant = CGFloat(50 * routineList.count) - tableViewHeight.constant = self.view.frame.size.height - (80 + 60) - CGFloat((50 * routineList.count)) - } - - override func viewDidDisappear(_ animated: Bool) { - super.viewDidDisappear(animated) - - if let index = routineTV.indexPathForSelectedRow { - routineTV.deselectRow(at: index, animated: true) - } - } - - func setUI() { - day1Label.viewRounded(cornerRadius: 5) - day2Label.viewRounded(cornerRadius: 5) - day3Label.viewRounded(cornerRadius: 5) - day4Label.viewRounded(cornerRadius: 5) - day5Label.viewRounded(cornerRadius: 5) - day6Label.viewRounded(cornerRadius: 5) - day7Label.viewRounded(cornerRadius: 5) - } -} -extension HomeVC: UICollectionViewDataSource { - func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { - return 7 * routineList.count * 4 - } - - func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { - let checkCell = routineCV.dequeueReusableCell(withReuseIdentifier: "CheckCell", for: indexPath) - checkCell.viewRounded(cornerRadius: 5) - return checkCell - } -} -extension HomeVC: UITableViewDataSource { - func numberOfSections(in tableView: UITableView) -> Int { - return 2 - } - - func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - if section == 0 { - return 1 - } - else { - if routineList.count == 0{ - routineTV.setEmptyView(message: "등록한 루틴이 없습니다.", image: "") - }else { - routineTV.restore() - } - return routineList.count - } - } - - func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { - if indexPath.section == 0 { - let dateCell = routineTV.dequeueReusableCell(withIdentifier: "DateCell") - return dateCell! - } - else { - let listCell = routineTV.dequeueReusableCell(withIdentifier: "RoutineTVCell", for: indexPath) as! RoutineTVCell - -// listCell.numLabel.text = "\(indexPath.row + 1)" -// listCell.listLabel.text = "\(routineList[indexPath.row])" - - return listCell - } - } -// func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) { -// if editingStyle == .delete { -// // Delete the row from the data source -// self.routineList.remove(at: indexPath.row) -// tableView.deleteRows(at: [indexPath], with: .fade) -// } -// } -} -extension HomeVC: UITableViewDelegate{ - // func tableView(_ tableView: UITableView, leadingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration? { - // let filterAction = UIContextualAction(style: .normal, title: "LEFT") { (action, view, bool) in - // print("Swiped to left filter") - // } - // filterAction.backgroundColor = UIColor.gray - // - // return UISwipeActionsConfiguration(actions: [filterAction]) - // } - - func tableView(_ tableView: UITableView, trailingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration? { - let doneAction = UIContextualAction(style: .normal, title: "다했다 !!!!") { (action, view, bool) in - print("루틴 완료") - } - doneAction.backgroundColor = UIColor.mainGreen - - return UISwipeActionsConfiguration(actions: [doneAction]) - } -} diff --git a/mytine/Sources/HomeVC3.swift b/mytine/Sources/HomeVC3.swift index 503d212..6a563af 100644 --- a/mytine/Sources/HomeVC3.swift +++ b/mytine/Sources/HomeVC3.swift @@ -34,6 +34,10 @@ class HomeVC3: UIViewController { tableView.deselectRow(at: index, animated: true) } } + + @IBAction func showCalendar(_ sender: UIBarButtonItem) { + self.navigationController?.popViewController(animated: true) + } } extension HomeVC3: UICollectionViewDelegate { @@ -76,6 +80,7 @@ extension HomeVC3: UITableViewDataSource { else { let cell = tableView.dequeueReusableCell(withIdentifier: "RoutineTVCell", for: indexPath) as! RoutineTVCell + cell.viewRounded(cornerRadius: 10) // cell.timeLabel.text = cell.listLabel.text = routineList[indexPath.row] // cell.iconLabel.text = @@ -83,18 +88,25 @@ extension HomeVC3: UITableViewDataSource { } } -// func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { -// if section == 1 { -// let cell = tableView.dequeueReusableCell(withIdentifier: "WeekTVCell") as! WeekTVCell -// -// cell.weekLabel.text = "월" -// -// return cell -// } -// else { -// let rect = CGRect(x: 0, y: 0, width: 0, height: 0) -// let myView = UIView(frame: rect) -// return myView -// } -// } + func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { + if section == 1 { + let cell = tableView.dequeueReusableCell(withIdentifier: "TabTVCell") + + return cell + } + else { + let rect = CGRect(x: 0, y: 0, width: 0, height: 0) + let myView = UIView(frame: rect) + return myView + } + } + + func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { + if section == 1 { + return 50 + } + else { + return 0 + } + } } diff --git a/mytine/Sources/Storyboard/Home.storyboard b/mytine/Sources/Storyboard/Home.storyboard index f5aa61a..39640f2 100644 --- a/mytine/Sources/Storyboard/Home.storyboard +++ b/mytine/Sources/Storyboard/Home.storyboard @@ -1,5 +1,5 @@ - + @@ -8,220 +8,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -294,7 +80,7 @@ - + @@ -312,7 +98,7 @@ - + @@ -414,12 +200,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -433,7 +287,11 @@ - + + + + + @@ -457,8 +315,8 @@ @@ -534,6 +392,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -803,7 +764,25 @@ - + + + + + + + + + + + + + + + + + + +