From 002d9e280476cafec46dcb43f9da140ffe8c5973 Mon Sep 17 00:00:00 2001 From: Jihee hwang Date: Tue, 7 Jun 2022 09:55:13 +0900 Subject: [PATCH 1/9] =?UTF-8?q?refactor:=20=EA=B0=9D=EC=B2=B4=20=EB=B6=84?= =?UTF-8?q?=EB=A6=AC=20=EB=B0=8F=20PR=20=ED=94=BC=EB=93=9C=EB=B0=B1=20?= =?UTF-8?q?=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- iOS/airbnb/airbnb.xcodeproj/project.pbxproj | 4 + .../Controller/SearchViewController.swift | 79 ++++++------------- .../SearchTableViewDataSource.swift | 66 ++++++++++++++++ .../airbnb/Sources/Model/CityData.swift | 2 +- 4 files changed, 95 insertions(+), 56 deletions(-) create mode 100644 iOS/airbnb/airbnb/Sources/Delegate&DataSource/SearchTableViewDataSource.swift diff --git a/iOS/airbnb/airbnb.xcodeproj/project.pbxproj b/iOS/airbnb/airbnb.xcodeproj/project.pbxproj index 269755a08..26f0d7108 100644 --- a/iOS/airbnb/airbnb.xcodeproj/project.pbxproj +++ b/iOS/airbnb/airbnb.xcodeproj/project.pbxproj @@ -8,6 +8,7 @@ /* Begin PBXBuildFile section */ 1DEF879FF49710DE9E378A0B /* Pods_airbnbTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 17879D07A8010A4E6A2147BE /* Pods_airbnbTests.framework */; }; + 731674C8284E095100ABC303 /* SearchTableViewDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 731674C7284E095100ABC303 /* SearchTableViewDataSource.swift */; }; 73202EF02844B63B006D53AE /* SearchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73202EEF2844B63B006D53AE /* SearchViewController.swift */; }; 73202EF62844B79A006D53AE /* CityViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73202EF52844B79A006D53AE /* CityViewCell.swift */; }; 73202EFA2845DAB6006D53AE /* CityData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73202EF92845DAB6006D53AE /* CityData.swift */; }; @@ -56,6 +57,7 @@ 4C8FBDEFF1B39C5BD4366F89 /* Pods-airbnb-airbnbUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-airbnb-airbnbUITests.debug.xcconfig"; path = "Target Support Files/Pods-airbnb-airbnbUITests/Pods-airbnb-airbnbUITests.debug.xcconfig"; sourceTree = ""; }; 4D0E80456C281DE34190974F /* Pods-airbnb.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-airbnb.debug.xcconfig"; path = "Target Support Files/Pods-airbnb/Pods-airbnb.debug.xcconfig"; sourceTree = ""; }; 4E46533D09A96A3749B72362 /* Pods-airbnb-airbnbUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-airbnb-airbnbUITests.release.xcconfig"; path = "Target Support Files/Pods-airbnb-airbnbUITests/Pods-airbnb-airbnbUITests.release.xcconfig"; sourceTree = ""; }; + 731674C7284E095100ABC303 /* SearchTableViewDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchTableViewDataSource.swift; sourceTree = ""; }; 73202EEF2844B63B006D53AE /* SearchViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = SearchViewController.swift; path = "/Users/jiheesmac/Masters 2022/0523-0610/airbnb-Team01/iOS/airbnb/airbnb/Sources/Controller/SearchViewController.swift"; sourceTree = ""; }; 73202EF52844B79A006D53AE /* CityViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CityViewCell.swift; sourceTree = ""; }; 73202EF92845DAB6006D53AE /* CityData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CityData.swift; sourceTree = ""; }; @@ -120,6 +122,7 @@ isa = PBXGroup; children = ( 7388ABE028488D690036D8CE /* HomeCollectionViewDataSource.swift */, + 731674C7284E095100ABC303 /* SearchTableViewDataSource.swift */, ); path = "Delegate&DataSource"; sourceTree = ""; @@ -518,6 +521,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 731674C8284E095100ABC303 /* SearchTableViewDataSource.swift in Sources */, 73571FD0283E1706002F411F /* MyReservationViewController.swift in Sources */, 73202EFA2845DAB6006D53AE /* CityData.swift in Sources */, 73571FD82840605D002F411F /* RecommendedTravelDestinationCell.swift in Sources */, diff --git a/iOS/airbnb/airbnb/Sources/Controller/SearchViewController.swift b/iOS/airbnb/airbnb/Sources/Controller/SearchViewController.swift index ca4e3bcc0..0fd13fdce 100644 --- a/iOS/airbnb/airbnb/Sources/Controller/SearchViewController.swift +++ b/iOS/airbnb/airbnb/Sources/Controller/SearchViewController.swift @@ -10,13 +10,10 @@ import SnapKit import MapKit final class SearchViewController: UIViewController { - - private let cityData = CityData.dataList private let tableView = UITableView(frame: .zero, style: .plain) private var searchCompleter = MKLocalSearchCompleter() // 자동완성 도와주는 객체 - private var searchResult = [MKLocalSearchCompletion]() // 자동완성한 결과를 담는 객체 - private var isSearching = false + private var dataSource = SearchTableViewDataSource() private lazy var rightButton = UIBarButtonItem(title: "지우기", style: .plain, target: self, action: #selector(didTabRemoveButton)) @@ -62,7 +59,7 @@ final class SearchViewController: UIViewController { tableView.register(CityViewCell.self, forCellReuseIdentifier: CityViewCell.identifier) tableView.register(LocationTableViewCell.self, forCellReuseIdentifier: LocationTableViewCell.identifier) - tableView.dataSource = self + tableView.dataSource = dataSource searchCompleter.delegate = self } @@ -87,25 +84,32 @@ final class SearchViewController: UIViewController { $0.bottom.leading.trailing.equalToSuperview() } } - +} + +// MARK: - extension + +extension SearchViewController { @objc func didTabRemoveButton(_ sender: Any) { searchController.searchBar.text = "" - isSearching = false - tableView.reloadData() + dataSource.didStartSearch(isSearching: false) + + DispatchQueue.main.async { + self.tableView.reloadData() + } } } -// MARK: - extension - extension SearchViewController: UISearchBarDelegate { func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) { - if searchText == "" { - isSearching = false - tableView.reloadData() + if searchText.isEmpty { + dataSource.didStartSearch(isSearching: false) + + DispatchQueue.main.async { + self.tableView.reloadData() + } } else { - isSearching = true + dataSource.didStartSearch(isSearching: true) searchCompleter.queryFragment = searchText - } } } @@ -113,46 +117,11 @@ extension SearchViewController: UISearchBarDelegate { extension SearchViewController: MKLocalSearchCompleterDelegate { // 자동완성 시 결과를 받는 함수 func completerDidUpdateResults(_ completer: MKLocalSearchCompleter) { - searchResult = completer.results - tableView.reloadData() - } -} - -extension SearchViewController: UITableViewDataSource { - func numberOfSections(in tableView: UITableView) -> Int { - isSearching ? 1 : cityData.count - } - - func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - isSearching ? searchResult.count : 1 - } - - func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { - if isSearching { - guard let cell = tableView.dequeueReusableCell(withIdentifier: LocationTableViewCell.identifier, for: indexPath) as? LocationTableViewCell else { - return UITableViewCell() - } - return makeLocationCell(cell: cell, indexPath: indexPath) - } else { - tableView.separatorColor = .clear - guard let cell = tableView.dequeueReusableCell(withIdentifier: CityViewCell.identifier, for: indexPath) as? CityViewCell else { - return UITableViewCell() - } - return makeCityCell(cell: cell, indexPath: indexPath) - } - } - - private func makeLocationCell(cell: LocationTableViewCell, indexPath: IndexPath) -> LocationTableViewCell { - let target = searchResult[indexPath.row] + let result = completer.results + dataSource.didGetTheResults(result: result) - cell.setData(title: target.title) - return cell - } - - private func makeCityCell(cell: CityViewCell, indexPath: IndexPath) -> CityViewCell { - let target = cityData[indexPath.section] - - cell.setData(image: target.image, city: target.city, distance: target.distance) - return cell + DispatchQueue.main.async { + self.tableView.reloadData() + } } } diff --git a/iOS/airbnb/airbnb/Sources/Delegate&DataSource/SearchTableViewDataSource.swift b/iOS/airbnb/airbnb/Sources/Delegate&DataSource/SearchTableViewDataSource.swift new file mode 100644 index 000000000..84376b7f9 --- /dev/null +++ b/iOS/airbnb/airbnb/Sources/Delegate&DataSource/SearchTableViewDataSource.swift @@ -0,0 +1,66 @@ +// +// SearchTableViewDataSource.swift +// airbnb +// +// Created by Jihee hwang on 2022/06/06. +// + +import UIKit +import MapKit + +final class SearchTableViewDataSource: NSObject, UITableViewDataSource { + + private let cityData = CityData.dataList + private var isSearching = false + private var searchResult = [MKLocalSearchCompletion]() // 자동완성한 결과를 담는 객체 + + func numberOfSections(in tableView: UITableView) -> Int { + isSearching ? 1 : cityData.count + } + + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + isSearching ? searchResult.count : 1 + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + if isSearching { + tableView.separatorColor = .line + + guard let cell = tableView.dequeueReusableCell(withIdentifier: LocationTableViewCell.identifier, for: indexPath) as? LocationTableViewCell else { + return UITableViewCell() + } + return makeLocationCell(cell: cell, indexPath: indexPath) + } else { + tableView.separatorColor = .clear + + guard let cell = tableView.dequeueReusableCell(withIdentifier: CityViewCell.identifier, for: indexPath) as? CityViewCell else { + return UITableViewCell() + } + return makeCityCell(cell: cell, indexPath: indexPath) + } + } + + private func makeLocationCell(cell: LocationTableViewCell, indexPath: IndexPath) -> LocationTableViewCell { + let target = searchResult[indexPath.row] + + cell.setData(title: target.title) + return cell + } + + private func makeCityCell(cell: CityViewCell, indexPath: IndexPath) -> CityViewCell { + let target = cityData[indexPath.section] + + cell.setData(image: target.image, city: target.city, distance: target.distance) + return cell + } +} + +extension SearchTableViewDataSource { + func didStartSearch(isSearching: Bool) { + self.isSearching = isSearching + } + + func didGetTheResults(result: [MKLocalSearchCompletion]) { + searchResult = result + } +} diff --git a/iOS/airbnb/airbnb/Sources/Model/CityData.swift b/iOS/airbnb/airbnb/Sources/Model/CityData.swift index ac65fdf5b..af7d0da9b 100644 --- a/iOS/airbnb/airbnb/Sources/Model/CityData.swift +++ b/iOS/airbnb/airbnb/Sources/Model/CityData.swift @@ -7,7 +7,7 @@ import Foundation -final class CityData { +struct CityData { var city: String var distance: String From 73051cf05f284c0d4f0acc8a637fa252dd8b4099 Mon Sep 17 00:00:00 2001 From: Jihee hwang Date: Tue, 7 Jun 2022 16:24:10 +0900 Subject: [PATCH 2/9] =?UTF-8?q?feat:=20=10SPM=EC=97=90=20Horizoncalendar?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xcshareddata/swiftpm/Package.resolved | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 iOS/airbnb/airbnb.xcworkspace/xcshareddata/swiftpm/Package.resolved diff --git a/iOS/airbnb/airbnb.xcworkspace/xcshareddata/swiftpm/Package.resolved b/iOS/airbnb/airbnb.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 000000000..588584a2b --- /dev/null +++ b/iOS/airbnb/airbnb.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,14 @@ +{ + "pins" : [ + { + "identity" : "horizoncalendar", + "kind" : "remoteSourceControl", + "location" : "https://github.com/airbnb/HorizonCalendar.git", + "state" : { + "revision" : "93b188c52650b3999eeb20cf256b69715de515ef", + "version" : "1.13.4" + } + } + ], + "version" : 2 +} From f5fc894c1338b76a74816c16eea03215c368bbf3 Mon Sep 17 00:00:00 2001 From: Jihee hwang Date: Tue, 7 Jun 2022 16:25:04 +0900 Subject: [PATCH 3/9] =?UTF-8?q?refactor:=20=EC=9E=90=EC=A3=BC=20=EC=82=AC?= =?UTF-8?q?=EC=9A=A9=ED=95=98=EB=8A=94=20UI=20Components=20=EB=B6=84?= =?UTF-8?q?=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- iOS/airbnb/airbnb/Sources/Common.swift | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/iOS/airbnb/airbnb/Sources/Common.swift b/iOS/airbnb/airbnb/Sources/Common.swift index b0f02eab2..c53918564 100644 --- a/iOS/airbnb/airbnb/Sources/Common.swift +++ b/iOS/airbnb/airbnb/Sources/Common.swift @@ -32,6 +32,7 @@ enum Title { } enum Size { + static let barHeight = CGFloat(95) static let heroImageCell = CGSize(width: 250, height: 500) } @@ -69,3 +70,17 @@ enum Layout { } } } + +enum UIComponents { + static let navigationBarUnderLineView: UIView = { + let view = UIView() + view.backgroundColor = .line + return view + }() + + static let backButton: UIBarButtonItem = { + let buttonItem = UIBarButtonItem(title: "뒤로", style: .plain, target: nil, action: nil) + buttonItem.tintColor = .black + return buttonItem + }() +} From 85138b5fb20517bfc64fbfea2f2150e8f8f8a261 Mon Sep 17 00:00:00 2001 From: Jihee hwang Date: Tue, 7 Jun 2022 16:26:07 +0900 Subject: [PATCH 4/9] =?UTF-8?q?feat:=20UI=20=EC=BD=94=EB=93=9C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD=20=EB=B0=8F=20=EB=B7=B0=20=EC=A0=84=ED=99=98=EC=9D=84?= =?UTF-8?q?=20=EC=9C=84=ED=95=9C=20Delegate=20=EC=B1=84=ED=83=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/HomeViewController.swift | 12 +++------- .../Controller/SearchViewController.swift | 22 ++++++++++++------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/iOS/airbnb/airbnb/Sources/Controller/HomeViewController.swift b/iOS/airbnb/airbnb/Sources/Controller/HomeViewController.swift index 860573460..814bc9ea6 100644 --- a/iOS/airbnb/airbnb/Sources/Controller/HomeViewController.swift +++ b/iOS/airbnb/airbnb/Sources/Controller/HomeViewController.swift @@ -11,12 +11,6 @@ import SnapKit final class HomeViewController: UIViewController { private let dataSource = HomeCollectionViewDataSource() - - private let backButton: UIBarButtonItem = { - let buttonItem = UIBarButtonItem(title: "뒤로", style: .plain, target: nil, action: nil) - buttonItem.tintColor = .black - return buttonItem - }() private let searchBarController: UISearchController = { let searchController = UISearchController(searchResultsController: nil) @@ -52,7 +46,7 @@ final class HomeViewController: UIViewController { navigationItem.searchController = searchBarController navigationItem.titleView = logoImageView - navigationItem.backBarButtonItem = backButton + navigationItem.backBarButtonItem = UIComponents.backButton navigationItem.hidesSearchBarWhenScrolling = false searchBarController.searchBar.delegate = self @@ -79,7 +73,7 @@ final class HomeViewController: UIViewController { extension HomeViewController: UISearchBarDelegate { func searchBarTextDidBeginEditing(_ searchBar: UISearchBar) { - let searchViewController = SearchViewController() - navigationController?.pushViewController(searchViewController, animated: true) + let nextViewController = SearchViewController() + navigationController?.pushViewController(nextViewController, animated: true) } } diff --git a/iOS/airbnb/airbnb/Sources/Controller/SearchViewController.swift b/iOS/airbnb/airbnb/Sources/Controller/SearchViewController.swift index 0fd13fdce..8e49f95c8 100644 --- a/iOS/airbnb/airbnb/Sources/Controller/SearchViewController.swift +++ b/iOS/airbnb/airbnb/Sources/Controller/SearchViewController.swift @@ -17,12 +17,6 @@ final class SearchViewController: UIViewController { private lazy var rightButton = UIBarButtonItem(title: "지우기", style: .plain, target: self, action: #selector(didTabRemoveButton)) - private let navigationBarUnderLineView: UIView = { - let view = UIView() - view.backgroundColor = .line - return view - }() - private let titleLabel: UILabel = { let label = UILabel() label.font = .systemFont(ofSize: 21, weight: .bold) @@ -46,6 +40,7 @@ final class SearchViewController: UIViewController { title = "숙소 찾기" view.backgroundColor = .white + navigationItem.backBarButtonItem = UIComponents.backButton navigationItem.rightBarButtonItem = rightButton navigationItem.searchController = searchController navigationItem.searchController?.searchBar.becomeFirstResponder() // First Responder 로 지정 @@ -60,16 +55,17 @@ final class SearchViewController: UIViewController { tableView.register(CityViewCell.self, forCellReuseIdentifier: CityViewCell.identifier) tableView.register(LocationTableViewCell.self, forCellReuseIdentifier: LocationTableViewCell.identifier) tableView.dataSource = dataSource + tableView.delegate = self searchCompleter.delegate = self } private func layout() { - view.addSubview(navigationBarUnderLineView) + view.addSubview(UIComponents.navigationBarUnderLineView) view.addSubview(titleLabel) view.addSubview(tableView) - navigationBarUnderLineView.snp.makeConstraints { + UIComponents.navigationBarUnderLineView.snp.makeConstraints { $0.top.leading.trailing.equalTo(view.safeAreaLayoutGuide) $0.height.equalTo(1) } @@ -125,3 +121,13 @@ extension SearchViewController: MKLocalSearchCompleterDelegate { } } } + +extension SearchViewController: UITableViewDelegate { + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + let cell = tableView.cellForRow(at: indexPath) + cell?.selectionStyle = .none + + let nextViewController = CalendarViewController() + navigationController?.pushViewController(nextViewController, animated: true) + } +} From 1ad34ad329091a2cdbd5ab855dadf0d1040f5ba7 Mon Sep 17 00:00:00 2001 From: Jihee hwang Date: Tue, 7 Jun 2022 16:27:01 +0900 Subject: [PATCH 5/9] =?UTF-8?q?feat:=20=EC=88=99=EC=86=8C=EC=B0=BE?= =?UTF-8?q?=EA=B8=B0-=EB=8B=AC=EB=A0=A5=20ViewController=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80=20=EB=B0=8F=20=EC=BD=94=EB=93=9C=20=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- iOS/airbnb/airbnb.xcodeproj/project.pbxproj | 31 ++++++++++ .../Controller/CalendarViewController.swift | 57 +++++++++++++++++++ .../Sources/Controller/TabBarController.swift | 6 +- .../airbnb/Sources/View/CityViewCell.swift | 6 -- 4 files changed, 90 insertions(+), 10 deletions(-) create mode 100644 iOS/airbnb/airbnb/Sources/Controller/CalendarViewController.swift diff --git a/iOS/airbnb/airbnb.xcodeproj/project.pbxproj b/iOS/airbnb/airbnb.xcodeproj/project.pbxproj index 26f0d7108..6004a3506 100644 --- a/iOS/airbnb/airbnb.xcodeproj/project.pbxproj +++ b/iOS/airbnb/airbnb.xcodeproj/project.pbxproj @@ -20,8 +20,10 @@ 73571FD0283E1706002F411F /* MyReservationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73571FCF283E1706002F411F /* MyReservationViewController.swift */; }; 73571FD4283F4621002F411F /* Common.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73571FD3283F4621002F411F /* Common.swift */; }; 73571FD82840605D002F411F /* RecommendedTravelDestinationCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73571FD72840605D002F411F /* RecommendedTravelDestinationCell.swift */; }; + 736ADC61284F1936000B5609 /* CalendarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 736ADC60284F1936000B5609 /* CalendarViewController.swift */; }; 7388ABE128488D690036D8CE /* HomeCollectionViewDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7388ABE028488D690036D8CE /* HomeCollectionViewDataSource.swift */; }; 7388ABEB2848ED230036D8CE /* LocationTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7388ABEA2848ED230036D8CE /* LocationTableViewCell.swift */; }; + 738CB7EB284EFD8C0009B17D /* HorizonCalendar in Frameworks */ = {isa = PBXBuildFile; productRef = 738CB7EA284EFD8C0009B17D /* HorizonCalendar */; }; 73B579C3284098C50043465D /* CollectionHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73B579C2284098C50043465D /* CollectionHeaderView.swift */; }; 73B9A767283C7EE8003A8C25 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73B9A766283C7EE8003A8C25 /* AppDelegate.swift */; }; 73B9A769283C7EE8003A8C25 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73B9A768283C7EE8003A8C25 /* SceneDelegate.swift */; }; @@ -69,6 +71,7 @@ 73571FCF283E1706002F411F /* MyReservationViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyReservationViewController.swift; sourceTree = ""; }; 73571FD3283F4621002F411F /* Common.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Common.swift; sourceTree = ""; }; 73571FD72840605D002F411F /* RecommendedTravelDestinationCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecommendedTravelDestinationCell.swift; sourceTree = ""; }; + 736ADC60284F1936000B5609 /* CalendarViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CalendarViewController.swift; sourceTree = ""; }; 7388ABE028488D690036D8CE /* HomeCollectionViewDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeCollectionViewDataSource.swift; sourceTree = ""; }; 7388ABEA2848ED230036D8CE /* LocationTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocationTableViewCell.swift; sourceTree = ""; }; 73B579C2284098C50043465D /* CollectionHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CollectionHeaderView.swift; sourceTree = ""; }; @@ -95,6 +98,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 738CB7EB284EFD8C0009B17D /* HorizonCalendar in Frameworks */, CB4B17F8D1F87148B26CE515 /* Pods_airbnb.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -155,6 +159,7 @@ 73571FCD283E16E9002F411F /* WishListViewController.swift */, 73571FCF283E1706002F411F /* MyReservationViewController.swift */, 73202EEF2844B63B006D53AE /* SearchViewController.swift */, + 736ADC60284F1936000B5609 /* CalendarViewController.swift */, ); path = Controller; sourceTree = ""; @@ -283,6 +288,9 @@ dependencies = ( ); name = airbnb; + packageProductDependencies = ( + 738CB7EA284EFD8C0009B17D /* HorizonCalendar */, + ); productName = airbnb; productReference = 73B9A763283C7EE8003A8C25 /* airbnb.app */; productType = "com.apple.product-type.application"; @@ -358,6 +366,9 @@ Base, ); mainGroup = 73B9A75A283C7EE8003A8C25; + packageReferences = ( + 738CB7E9284EFD8C0009B17D /* XCRemoteSwiftPackageReference "HorizonCalendar" */, + ); productRefGroup = 73B9A764283C7EE8003A8C25 /* Products */; projectDirPath = ""; projectRoot = ""; @@ -522,6 +533,7 @@ buildActionMask = 2147483647; files = ( 731674C8284E095100ABC303 /* SearchTableViewDataSource.swift in Sources */, + 736ADC61284F1936000B5609 /* CalendarViewController.swift in Sources */, 73571FD0283E1706002F411F /* MyReservationViewController.swift in Sources */, 73202EFA2845DAB6006D53AE /* CityData.swift in Sources */, 73571FD82840605D002F411F /* RecommendedTravelDestinationCell.swift in Sources */, @@ -875,6 +887,25 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + 738CB7E9284EFD8C0009B17D /* XCRemoteSwiftPackageReference "HorizonCalendar" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/airbnb/HorizonCalendar.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 1.0.0; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 738CB7EA284EFD8C0009B17D /* HorizonCalendar */ = { + isa = XCSwiftPackageProductDependency; + package = 738CB7E9284EFD8C0009B17D /* XCRemoteSwiftPackageReference "HorizonCalendar" */; + productName = HorizonCalendar; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = 73B9A75B283C7EE8003A8C25 /* Project object */; } diff --git a/iOS/airbnb/airbnb/Sources/Controller/CalendarViewController.swift b/iOS/airbnb/airbnb/Sources/Controller/CalendarViewController.swift new file mode 100644 index 000000000..b21613d3f --- /dev/null +++ b/iOS/airbnb/airbnb/Sources/Controller/CalendarViewController.swift @@ -0,0 +1,57 @@ +// +// CalendarViewController.swift +// airbnb +// +// Created by Jihee hwang on 2022/06/07. +// + +import UIKit +import SnapKit + +final class CalendarViewController: UIViewController { + + private let clearButton: UIBarButtonItem = { + let buttonItem = UIBarButtonItem(title: "지우기", style: .plain, target: nil, action: nil) + buttonItem.tintColor = .gray3 + return buttonItem + }() + + private let nextButton: UIBarButtonItem = { + let buttonItem = UIBarButtonItem(title: "다음", style: .plain, target: nil, action: nil) + buttonItem.tintColor = .black + return buttonItem + }() + + private lazy var toolBar: UIToolbar = { + let toolBar = UIToolbar() + let flexibleSpace = UIBarButtonItem(barButtonSystemItem: .flexibleSpace, target: self, action: nil) + toolBar.setItems([clearButton, flexibleSpace, nextButton], animated: true) + return toolBar + }() + + override func viewDidLoad() { + super.viewDidLoad() + configureView() + layout() + } + + override func viewWillDisappear(_ animated: Bool) { + super.viewWillDisappear(false) + navigationController?.tabBarController?.tabBar.isHidden = false + } + + private func configureView() { + view.backgroundColor = .white + title = "숙소 찾기" + + navigationController?.tabBarController?.tabBar.isHidden = true + } + + private func layout() { + view.addSubview(toolBar) + + toolBar.snp.makeConstraints { + $0.bottom.leading.trailing.equalTo(view.safeAreaLayoutGuide) + } + } +} diff --git a/iOS/airbnb/airbnb/Sources/Controller/TabBarController.swift b/iOS/airbnb/airbnb/Sources/Controller/TabBarController.swift index fb5ae7b7a..8140ad353 100644 --- a/iOS/airbnb/airbnb/Sources/Controller/TabBarController.swift +++ b/iOS/airbnb/airbnb/Sources/Controller/TabBarController.swift @@ -8,8 +8,6 @@ import UIKit final class TabBarController: UITabBarController { - - private let tabBarHeight: CGFloat = 95 private let searchVC = UINavigationController(rootViewController: HomeViewController()) private let wishListVC = UINavigationController(rootViewController: WishListViewController()) @@ -25,8 +23,8 @@ final class TabBarController: UITabBarController { super.viewDidLayoutSubviews() var tabBarFrame = tabBar.frame - tabBarFrame.size.height = tabBarHeight - tabBarFrame.origin.y = view.frame.size.height - tabBarHeight + tabBarFrame.size.height = Size.barHeight + tabBarFrame.origin.y = view.frame.size.height - Size.barHeight tabBar.frame = tabBarFrame } diff --git a/iOS/airbnb/airbnb/Sources/View/CityViewCell.swift b/iOS/airbnb/airbnb/Sources/View/CityViewCell.swift index e8263ee78..e19f37d7b 100644 --- a/iOS/airbnb/airbnb/Sources/View/CityViewCell.swift +++ b/iOS/airbnb/airbnb/Sources/View/CityViewCell.swift @@ -46,12 +46,6 @@ final class CityViewCell: UITableViewCell { fatalError("Init with coder is unavailable") } - override func setSelected(_ selected: Bool, animated: Bool) { - super.setSelected(selected, animated: animated) - - contentView.layer.backgroundColor = selected ? UIColor.gray5.cgColor : UIColor.white.cgColor - } - private func layout() { contentView.addSubview(cityImageView) contentView.addSubview(stackView) From a14ba9aa4720ed508e8a812c7553207a01599933 Mon Sep 17 00:00:00 2001 From: Jihee hwang Date: Tue, 7 Jun 2022 17:06:53 +0900 Subject: [PATCH 6/9] =?UTF-8?q?feat:=20Calendar=20Cell=EC=97=90=20?= =?UTF-8?q?=EB=8B=AC=EB=A0=A5=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 임시데이터라 리팩토링 해야함 --- iOS/airbnb/airbnb.xcodeproj/project.pbxproj | 4 ++ iOS/airbnb/airbnb/Sources/Common.swift | 16 ++++++ .../Controller/CalendarViewController.swift | 30 ++++++++++++ .../airbnb/Sources/View/CalendarCell.swift | 49 +++++++++++++++++++ 4 files changed, 99 insertions(+) create mode 100644 iOS/airbnb/airbnb/Sources/View/CalendarCell.swift diff --git a/iOS/airbnb/airbnb.xcodeproj/project.pbxproj b/iOS/airbnb/airbnb.xcodeproj/project.pbxproj index 6004a3506..91a2c67d8 100644 --- a/iOS/airbnb/airbnb.xcodeproj/project.pbxproj +++ b/iOS/airbnb/airbnb.xcodeproj/project.pbxproj @@ -21,6 +21,7 @@ 73571FD4283F4621002F411F /* Common.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73571FD3283F4621002F411F /* Common.swift */; }; 73571FD82840605D002F411F /* RecommendedTravelDestinationCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73571FD72840605D002F411F /* RecommendedTravelDestinationCell.swift */; }; 736ADC61284F1936000B5609 /* CalendarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 736ADC60284F1936000B5609 /* CalendarViewController.swift */; }; + 736ADC65284F3744000B5609 /* CalendarCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 736ADC64284F3744000B5609 /* CalendarCell.swift */; }; 7388ABE128488D690036D8CE /* HomeCollectionViewDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7388ABE028488D690036D8CE /* HomeCollectionViewDataSource.swift */; }; 7388ABEB2848ED230036D8CE /* LocationTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7388ABEA2848ED230036D8CE /* LocationTableViewCell.swift */; }; 738CB7EB284EFD8C0009B17D /* HorizonCalendar in Frameworks */ = {isa = PBXBuildFile; productRef = 738CB7EA284EFD8C0009B17D /* HorizonCalendar */; }; @@ -72,6 +73,7 @@ 73571FD3283F4621002F411F /* Common.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Common.swift; sourceTree = ""; }; 73571FD72840605D002F411F /* RecommendedTravelDestinationCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecommendedTravelDestinationCell.swift; sourceTree = ""; }; 736ADC60284F1936000B5609 /* CalendarViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CalendarViewController.swift; sourceTree = ""; }; + 736ADC64284F3744000B5609 /* CalendarCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CalendarCell.swift; sourceTree = ""; }; 7388ABE028488D690036D8CE /* HomeCollectionViewDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeCollectionViewDataSource.swift; sourceTree = ""; }; 7388ABEA2848ED230036D8CE /* LocationTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocationTableViewCell.swift; sourceTree = ""; }; 73B579C2284098C50043465D /* CollectionHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CollectionHeaderView.swift; sourceTree = ""; }; @@ -144,6 +146,7 @@ children = ( 73B579C2284098C50043465D /* CollectionHeaderView.swift */, 73571FC5283E0CEF002F411F /* HeroImageCell.swift */, + 736ADC64284F3744000B5609 /* CalendarCell.swift */, 73571FD72840605D002F411F /* RecommendedTravelDestinationCell.swift */, 73202EF52844B79A006D53AE /* CityViewCell.swift */, 7388ABEA2848ED230036D8CE /* LocationTableViewCell.swift */, @@ -542,6 +545,7 @@ 73571FC6283E0CEF002F411F /* HeroImageCell.swift in Sources */, 73571FD4283F4621002F411F /* Common.swift in Sources */, 7388ABE128488D690036D8CE /* HomeCollectionViewDataSource.swift in Sources */, + 736ADC65284F3744000B5609 /* CalendarCell.swift in Sources */, 73B9A769283C7EE8003A8C25 /* SceneDelegate.swift in Sources */, 73202EF02844B63B006D53AE /* SearchViewController.swift in Sources */, 73571FCB283E16A0002F411F /* HomeViewController.swift in Sources */, diff --git a/iOS/airbnb/airbnb/Sources/Common.swift b/iOS/airbnb/airbnb/Sources/Common.swift index c53918564..c1a691e90 100644 --- a/iOS/airbnb/airbnb/Sources/Common.swift +++ b/iOS/airbnb/airbnb/Sources/Common.swift @@ -62,6 +62,16 @@ enum Layout { return section }() + static let calendarLayout: NSCollectionLayoutSection = { + let item = NSCollectionLayoutItem(layoutSize: .init(widthDimension: .fractionalWidth(1), heightDimension: .fractionalHeight(1.3))) + + let group = NSCollectionLayoutGroup.horizontal(layoutSize: .init(widthDimension: .fractionalWidth(1), heightDimension: .fractionalHeight(0.5)), subitems: [item]) + + let section = NSCollectionLayoutSection(group: group) + section.contentInsets.bottom = 150 + return section + }() + static func createLayout() -> UICollectionViewCompositionalLayout { return UICollectionViewCompositionalLayout { (sectionNumber, env) -> NSCollectionLayoutSection? in if sectionNumber == 0 { @@ -69,6 +79,12 @@ enum Layout { } else { return travelDestinationLayout } } } + + static func calendar() -> UICollectionViewCompositionalLayout { + return UICollectionViewCompositionalLayout { (sectionNumber, env) -> NSCollectionLayoutSection? in + return calendarLayout + } + } } enum UIComponents { diff --git a/iOS/airbnb/airbnb/Sources/Controller/CalendarViewController.swift b/iOS/airbnb/airbnb/Sources/Controller/CalendarViewController.swift index b21613d3f..6f139ce39 100644 --- a/iOS/airbnb/airbnb/Sources/Controller/CalendarViewController.swift +++ b/iOS/airbnb/airbnb/Sources/Controller/CalendarViewController.swift @@ -29,9 +29,16 @@ final class CalendarViewController: UIViewController { return toolBar }() + private let collectionView: UICollectionView = { + let layout = Layout.calendar() + let collectionView = UICollectionView(frame: .zero, collectionViewLayout: layout) + return collectionView + }() + override func viewDidLoad() { super.viewDidLoad() configureView() + setCollectionView() layout() } @@ -47,11 +54,34 @@ final class CalendarViewController: UIViewController { navigationController?.tabBarController?.tabBar.isHidden = true } + private func setCollectionView() { + collectionView.dataSource = self + + collectionView.register(CalendarCell.self, forCellWithReuseIdentifier: CalendarCell.identifier) + } + private func layout() { view.addSubview(toolBar) + view.addSubview(collectionView) toolBar.snp.makeConstraints { $0.bottom.leading.trailing.equalTo(view.safeAreaLayoutGuide) } + + collectionView.snp.makeConstraints { + $0.top.leading.trailing.equalTo(view.safeAreaLayoutGuide) + $0.bottom.equalTo(toolBar.snp.top) + } + } +} + +extension CalendarViewController: UICollectionViewDataSource { + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + 1 + } + + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: CalendarCell.identifier, for: indexPath) as? CalendarCell else { return UICollectionViewCell() } + return cell } } diff --git a/iOS/airbnb/airbnb/Sources/View/CalendarCell.swift b/iOS/airbnb/airbnb/Sources/View/CalendarCell.swift new file mode 100644 index 000000000..3f52b7906 --- /dev/null +++ b/iOS/airbnb/airbnb/Sources/View/CalendarCell.swift @@ -0,0 +1,49 @@ +// +// CalendarCell.swift +// airbnb +// +// Created by Jihee hwang on 2022/06/07. +// + +import UIKit +import SnapKit +import HorizonCalendar + +final class CalendarCell: UICollectionViewCell { + + static let identifier = "CalendarCell" + + private let calendar = Calendar.current + private lazy var calendarView = CalendarView(initialContent: makeContent()) + + override init(frame: CGRect) { + super.init(frame: frame) + layout() + } + + @available(*, unavailable) + required init?(coder: NSCoder) { + fatalError("Init with coder is unavailable") + } + + private func layout() { + contentView.addSubview(calendarView) + + calendarView.snp.makeConstraints { + $0.top.leading.equalTo(20) + $0.trailing.equalTo(-30) + } + } + + private func makeContent() -> CalendarViewContent { + let calendar = Calendar.current + + let startDate = calendar.date(from: DateComponents(year: 2020, month: 01, day: 01))! + let endDate = calendar.date(from: DateComponents(year: 2021, month: 12, day: 31))! + + return CalendarViewContent( + calendar: calendar, + visibleDateRange: startDate...endDate, + monthsLayout: .horizontal(options: HorizontalMonthsLayoutOptions())) + } +} From e620030d6e5cd593f0166b4e721552d3ac21ba9e Mon Sep 17 00:00:00 2001 From: Jihee hwang Date: Wed, 8 Jun 2022 12:05:57 +0900 Subject: [PATCH 7/9] =?UTF-8?q?feat:=20FSCalendar=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- iOS/airbnb/airbnb.xcodeproj/project.pbxproj | 19 ++++++- .../xcshareddata/swiftpm/Package.resolved | 9 ++++ iOS/airbnb/airbnb/Sources/Common.swift | 10 +--- .../Controller/CalendarViewController.swift | 34 +++---------- .../airbnb/Sources/View/CalendarCell.swift | 49 ------------------- 5 files changed, 35 insertions(+), 86 deletions(-) delete mode 100644 iOS/airbnb/airbnb/Sources/View/CalendarCell.swift diff --git a/iOS/airbnb/airbnb.xcodeproj/project.pbxproj b/iOS/airbnb/airbnb.xcodeproj/project.pbxproj index 91a2c67d8..dd1b346a9 100644 --- a/iOS/airbnb/airbnb.xcodeproj/project.pbxproj +++ b/iOS/airbnb/airbnb.xcodeproj/project.pbxproj @@ -22,6 +22,7 @@ 73571FD82840605D002F411F /* RecommendedTravelDestinationCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73571FD72840605D002F411F /* RecommendedTravelDestinationCell.swift */; }; 736ADC61284F1936000B5609 /* CalendarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 736ADC60284F1936000B5609 /* CalendarViewController.swift */; }; 736ADC65284F3744000B5609 /* CalendarCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 736ADC64284F3744000B5609 /* CalendarCell.swift */; }; + 7374B81C285044B500BAB4F4 /* FSCalendar in Frameworks */ = {isa = PBXBuildFile; productRef = 7374B81B285044B500BAB4F4 /* FSCalendar */; }; 7388ABE128488D690036D8CE /* HomeCollectionViewDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7388ABE028488D690036D8CE /* HomeCollectionViewDataSource.swift */; }; 7388ABEB2848ED230036D8CE /* LocationTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7388ABEA2848ED230036D8CE /* LocationTableViewCell.swift */; }; 738CB7EB284EFD8C0009B17D /* HorizonCalendar in Frameworks */ = {isa = PBXBuildFile; productRef = 738CB7EA284EFD8C0009B17D /* HorizonCalendar */; }; @@ -101,6 +102,7 @@ buildActionMask = 2147483647; files = ( 738CB7EB284EFD8C0009B17D /* HorizonCalendar in Frameworks */, + 7374B81C285044B500BAB4F4 /* FSCalendar in Frameworks */, CB4B17F8D1F87148B26CE515 /* Pods_airbnb.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -146,10 +148,10 @@ children = ( 73B579C2284098C50043465D /* CollectionHeaderView.swift */, 73571FC5283E0CEF002F411F /* HeroImageCell.swift */, - 736ADC64284F3744000B5609 /* CalendarCell.swift */, 73571FD72840605D002F411F /* RecommendedTravelDestinationCell.swift */, 73202EF52844B79A006D53AE /* CityViewCell.swift */, 7388ABEA2848ED230036D8CE /* LocationTableViewCell.swift */, + 736ADC64284F3744000B5609 /* CalendarCell.swift */, ); path = View; sourceTree = ""; @@ -293,6 +295,7 @@ name = airbnb; packageProductDependencies = ( 738CB7EA284EFD8C0009B17D /* HorizonCalendar */, + 7374B81B285044B500BAB4F4 /* FSCalendar */, ); productName = airbnb; productReference = 73B9A763283C7EE8003A8C25 /* airbnb.app */; @@ -371,6 +374,7 @@ mainGroup = 73B9A75A283C7EE8003A8C25; packageReferences = ( 738CB7E9284EFD8C0009B17D /* XCRemoteSwiftPackageReference "HorizonCalendar" */, + 7374B81A285044B500BAB4F4 /* XCRemoteSwiftPackageReference "FSCalendar" */, ); productRefGroup = 73B9A764283C7EE8003A8C25 /* Products */; projectDirPath = ""; @@ -893,6 +897,14 @@ /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ + 7374B81A285044B500BAB4F4 /* XCRemoteSwiftPackageReference "FSCalendar" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/WenchaoD/FSCalendar.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 2.8.3; + }; + }; 738CB7E9284EFD8C0009B17D /* XCRemoteSwiftPackageReference "HorizonCalendar" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/airbnb/HorizonCalendar.git"; @@ -904,6 +916,11 @@ /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ + 7374B81B285044B500BAB4F4 /* FSCalendar */ = { + isa = XCSwiftPackageProductDependency; + package = 7374B81A285044B500BAB4F4 /* XCRemoteSwiftPackageReference "FSCalendar" */; + productName = FSCalendar; + }; 738CB7EA284EFD8C0009B17D /* HorizonCalendar */ = { isa = XCSwiftPackageProductDependency; package = 738CB7E9284EFD8C0009B17D /* XCRemoteSwiftPackageReference "HorizonCalendar" */; diff --git a/iOS/airbnb/airbnb.xcworkspace/xcshareddata/swiftpm/Package.resolved b/iOS/airbnb/airbnb.xcworkspace/xcshareddata/swiftpm/Package.resolved index 588584a2b..5ca32f661 100644 --- a/iOS/airbnb/airbnb.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/iOS/airbnb/airbnb.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,5 +1,14 @@ { "pins" : [ + { + "identity" : "fscalendar", + "kind" : "remoteSourceControl", + "location" : "https://github.com/WenchaoD/FSCalendar.git", + "state" : { + "revision" : "0fbdec5172fccb90f707472eeaea4ffe095278f6", + "version" : "2.8.4" + } + }, { "identity" : "horizoncalendar", "kind" : "remoteSourceControl", diff --git a/iOS/airbnb/airbnb/Sources/Common.swift b/iOS/airbnb/airbnb/Sources/Common.swift index c1a691e90..7ccd6592e 100644 --- a/iOS/airbnb/airbnb/Sources/Common.swift +++ b/iOS/airbnb/airbnb/Sources/Common.swift @@ -62,14 +62,14 @@ enum Layout { return section }() - static let calendarLayout: NSCollectionLayoutSection = { + static let calendarLayout: UICollectionViewCompositionalLayout = { let item = NSCollectionLayoutItem(layoutSize: .init(widthDimension: .fractionalWidth(1), heightDimension: .fractionalHeight(1.3))) let group = NSCollectionLayoutGroup.horizontal(layoutSize: .init(widthDimension: .fractionalWidth(1), heightDimension: .fractionalHeight(0.5)), subitems: [item]) let section = NSCollectionLayoutSection(group: group) section.contentInsets.bottom = 150 - return section + return UICollectionViewCompositionalLayout(section: section) }() static func createLayout() -> UICollectionViewCompositionalLayout { @@ -79,12 +79,6 @@ enum Layout { } else { return travelDestinationLayout } } } - - static func calendar() -> UICollectionViewCompositionalLayout { - return UICollectionViewCompositionalLayout { (sectionNumber, env) -> NSCollectionLayoutSection? in - return calendarLayout - } - } } enum UIComponents { diff --git a/iOS/airbnb/airbnb/Sources/Controller/CalendarViewController.swift b/iOS/airbnb/airbnb/Sources/Controller/CalendarViewController.swift index 6f139ce39..e7d66a087 100644 --- a/iOS/airbnb/airbnb/Sources/Controller/CalendarViewController.swift +++ b/iOS/airbnb/airbnb/Sources/Controller/CalendarViewController.swift @@ -7,6 +7,7 @@ import UIKit import SnapKit +import FSCalendar final class CalendarViewController: UIViewController { @@ -28,17 +29,12 @@ final class CalendarViewController: UIViewController { toolBar.setItems([clearButton, flexibleSpace, nextButton], animated: true) return toolBar }() - - private let collectionView: UICollectionView = { - let layout = Layout.calendar() - let collectionView = UICollectionView(frame: .zero, collectionViewLayout: layout) - return collectionView - }() + + private let calendarView = FSCalendar(frame: .zero) override func viewDidLoad() { super.viewDidLoad() configureView() - setCollectionView() layout() } @@ -54,34 +50,16 @@ final class CalendarViewController: UIViewController { navigationController?.tabBarController?.tabBar.isHidden = true } - private func setCollectionView() { - collectionView.dataSource = self - - collectionView.register(CalendarCell.self, forCellWithReuseIdentifier: CalendarCell.identifier) - } - private func layout() { view.addSubview(toolBar) - view.addSubview(collectionView) + view.addSubview(calendarView) toolBar.snp.makeConstraints { $0.bottom.leading.trailing.equalTo(view.safeAreaLayoutGuide) } - collectionView.snp.makeConstraints { - $0.top.leading.trailing.equalTo(view.safeAreaLayoutGuide) - $0.bottom.equalTo(toolBar.snp.top) + calendarView.snp.makeConstraints { + $0.top.leading.trailing.bottom.equalTo(view.safeAreaLayoutGuide) } } } - -extension CalendarViewController: UICollectionViewDataSource { - func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { - 1 - } - - func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { - guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: CalendarCell.identifier, for: indexPath) as? CalendarCell else { return UICollectionViewCell() } - return cell - } -} diff --git a/iOS/airbnb/airbnb/Sources/View/CalendarCell.swift b/iOS/airbnb/airbnb/Sources/View/CalendarCell.swift deleted file mode 100644 index 3f52b7906..000000000 --- a/iOS/airbnb/airbnb/Sources/View/CalendarCell.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// CalendarCell.swift -// airbnb -// -// Created by Jihee hwang on 2022/06/07. -// - -import UIKit -import SnapKit -import HorizonCalendar - -final class CalendarCell: UICollectionViewCell { - - static let identifier = "CalendarCell" - - private let calendar = Calendar.current - private lazy var calendarView = CalendarView(initialContent: makeContent()) - - override init(frame: CGRect) { - super.init(frame: frame) - layout() - } - - @available(*, unavailable) - required init?(coder: NSCoder) { - fatalError("Init with coder is unavailable") - } - - private func layout() { - contentView.addSubview(calendarView) - - calendarView.snp.makeConstraints { - $0.top.leading.equalTo(20) - $0.trailing.equalTo(-30) - } - } - - private func makeContent() -> CalendarViewContent { - let calendar = Calendar.current - - let startDate = calendar.date(from: DateComponents(year: 2020, month: 01, day: 01))! - let endDate = calendar.date(from: DateComponents(year: 2021, month: 12, day: 31))! - - return CalendarViewContent( - calendar: calendar, - visibleDateRange: startDate...endDate, - monthsLayout: .horizontal(options: HorizontalMonthsLayoutOptions())) - } -} From 8a9d0d8958f2d81300c5268b10edf5c27a2967b2 Mon Sep 17 00:00:00 2001 From: Jihee hwang Date: Fri, 10 Jun 2022 13:46:00 +0900 Subject: [PATCH 8/9] =?UTF-8?q?feat:=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20?= =?UTF-8?q?=EA=B8=B0=EB=8A=A5=20=EA=B5=AC=ED=98=84=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- iOS/airbnb/airbnb.xcodeproj/project.pbxproj | 4 -- iOS/airbnb/airbnb/Info.plist | 11 ++++ .../Controller/HomeViewController.swift | 14 ++++- .../Controller/LoginViewController.swift | 57 +++++++++++++++++++ iOS/airbnb/airbnb/Sources/Model/Login.swift | 38 +++++++++++++ 5 files changed, 118 insertions(+), 6 deletions(-) create mode 100644 iOS/airbnb/airbnb/Sources/Controller/LoginViewController.swift create mode 100644 iOS/airbnb/airbnb/Sources/Model/Login.swift diff --git a/iOS/airbnb/airbnb.xcodeproj/project.pbxproj b/iOS/airbnb/airbnb.xcodeproj/project.pbxproj index dd1b346a9..27e180080 100644 --- a/iOS/airbnb/airbnb.xcodeproj/project.pbxproj +++ b/iOS/airbnb/airbnb.xcodeproj/project.pbxproj @@ -21,7 +21,6 @@ 73571FD4283F4621002F411F /* Common.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73571FD3283F4621002F411F /* Common.swift */; }; 73571FD82840605D002F411F /* RecommendedTravelDestinationCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73571FD72840605D002F411F /* RecommendedTravelDestinationCell.swift */; }; 736ADC61284F1936000B5609 /* CalendarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 736ADC60284F1936000B5609 /* CalendarViewController.swift */; }; - 736ADC65284F3744000B5609 /* CalendarCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 736ADC64284F3744000B5609 /* CalendarCell.swift */; }; 7374B81C285044B500BAB4F4 /* FSCalendar in Frameworks */ = {isa = PBXBuildFile; productRef = 7374B81B285044B500BAB4F4 /* FSCalendar */; }; 7388ABE128488D690036D8CE /* HomeCollectionViewDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7388ABE028488D690036D8CE /* HomeCollectionViewDataSource.swift */; }; 7388ABEB2848ED230036D8CE /* LocationTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7388ABEA2848ED230036D8CE /* LocationTableViewCell.swift */; }; @@ -74,7 +73,6 @@ 73571FD3283F4621002F411F /* Common.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Common.swift; sourceTree = ""; }; 73571FD72840605D002F411F /* RecommendedTravelDestinationCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecommendedTravelDestinationCell.swift; sourceTree = ""; }; 736ADC60284F1936000B5609 /* CalendarViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CalendarViewController.swift; sourceTree = ""; }; - 736ADC64284F3744000B5609 /* CalendarCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CalendarCell.swift; sourceTree = ""; }; 7388ABE028488D690036D8CE /* HomeCollectionViewDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeCollectionViewDataSource.swift; sourceTree = ""; }; 7388ABEA2848ED230036D8CE /* LocationTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocationTableViewCell.swift; sourceTree = ""; }; 73B579C2284098C50043465D /* CollectionHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CollectionHeaderView.swift; sourceTree = ""; }; @@ -151,7 +149,6 @@ 73571FD72840605D002F411F /* RecommendedTravelDestinationCell.swift */, 73202EF52844B79A006D53AE /* CityViewCell.swift */, 7388ABEA2848ED230036D8CE /* LocationTableViewCell.swift */, - 736ADC64284F3744000B5609 /* CalendarCell.swift */, ); path = View; sourceTree = ""; @@ -549,7 +546,6 @@ 73571FC6283E0CEF002F411F /* HeroImageCell.swift in Sources */, 73571FD4283F4621002F411F /* Common.swift in Sources */, 7388ABE128488D690036D8CE /* HomeCollectionViewDataSource.swift in Sources */, - 736ADC65284F3744000B5609 /* CalendarCell.swift in Sources */, 73B9A769283C7EE8003A8C25 /* SceneDelegate.swift in Sources */, 73202EF02844B63B006D53AE /* SearchViewController.swift in Sources */, 73571FCB283E16A0002F411F /* HomeViewController.swift in Sources */, diff --git a/iOS/airbnb/airbnb/Info.plist b/iOS/airbnb/airbnb/Info.plist index 0eb786dc1..fba23c9dd 100644 --- a/iOS/airbnb/airbnb/Info.plist +++ b/iOS/airbnb/airbnb/Info.plist @@ -2,6 +2,17 @@ + CFBundleURLTypes + + + CFBundleTypeRole + Editor + CFBundleURLSchemes + + 3.36.56.107:8080 + + + UIApplicationSceneManifest UIApplicationSupportsMultipleScenes diff --git a/iOS/airbnb/airbnb/Sources/Controller/HomeViewController.swift b/iOS/airbnb/airbnb/Sources/Controller/HomeViewController.swift index 814bc9ea6..821cdbff0 100644 --- a/iOS/airbnb/airbnb/Sources/Controller/HomeViewController.swift +++ b/iOS/airbnb/airbnb/Sources/Controller/HomeViewController.swift @@ -11,6 +11,8 @@ import SnapKit final class HomeViewController: UIViewController { private let dataSource = HomeCollectionViewDataSource() + + private lazy var loginButton = UIBarButtonItem(image: UIImage(systemName: "person"), style: .plain, target: self, action: #selector(didTabLoginButton)) private let searchBarController: UISearchController = { let searchController = UISearchController(searchResultsController: nil) @@ -47,7 +49,9 @@ final class HomeViewController: UIViewController { navigationItem.searchController = searchBarController navigationItem.titleView = logoImageView navigationItem.backBarButtonItem = UIComponents.backButton + navigationItem.rightBarButtonItem = loginButton navigationItem.hidesSearchBarWhenScrolling = false + loginButton.tintColor = .black searchBarController.searchBar.delegate = self } @@ -62,18 +66,24 @@ final class HomeViewController: UIViewController { private func layout() { view.addSubview(collectionView) - + collectionView.snp.makeConstraints { $0.edges.equalTo(view.safeAreaLayoutGuide) } } + + @objc func didTabLoginButton(_ sender: Any) { + let nextViewController = SearchViewController() + navigationController?.pushViewController(nextViewController, animated: true) +// LoginManager.shared.requestCode() + } } // MARK: - extension extension HomeViewController: UISearchBarDelegate { func searchBarTextDidBeginEditing(_ searchBar: UISearchBar) { - let nextViewController = SearchViewController() + let nextViewController = LoginViewController() navigationController?.pushViewController(nextViewController, animated: true) } } diff --git a/iOS/airbnb/airbnb/Sources/Controller/LoginViewController.swift b/iOS/airbnb/airbnb/Sources/Controller/LoginViewController.swift new file mode 100644 index 000000000..d9dbcf9fa --- /dev/null +++ b/iOS/airbnb/airbnb/Sources/Controller/LoginViewController.swift @@ -0,0 +1,57 @@ +// +// LoginViewController.swift +// airbnb +// +// Created by Jihee hwang on 2022/06/10. +// + +import UIKit +import SnapKit + +final class LoginViewController: UIViewController { + + private let gitHubLoginButton: UIButton = { + let button = UIButton() + button.setTitle("", for: <#T##UIControl.State#>) + return button + }() + + let googleLoginButton: UIButton = { + var config = UIButton.Configuration.bordered() + config.baseBackgroundColor = .white + config.cornerStyle = .capsule + config.background.cornerRadius = 20 + config.background.strokeColor = .grey3 + config.title = "구글 로그인" + config.baseForegroundColor = .black + config.image = UIImage(named: "Google_Logo") + config.imagePadding = 10 + config.imagePlacement = .leading + + let button = UIButton(configuration: config) + return button + }() + + override func viewDidLoad() { + super.viewDidLoad() + configureView() + layout() + } + + private func configureView() { + view.backgroundColor = .white + title = "로그인" + navigationItem.backBarButtonItem = UIComponents.backButton + + navigationController?.tabBarController?.tabBar.isHidden = true + } + + private func layout() { + view.addSubview(UIComponents.navigationBarUnderLineView) + + UIComponents.navigationBarUnderLineView.snp.makeConstraints { + $0.top.leading.trailing.equalTo(view.safeAreaLayoutGuide) + $0.height.equalTo(1) + } + } +} diff --git a/iOS/airbnb/airbnb/Sources/Model/Login.swift b/iOS/airbnb/airbnb/Sources/Model/Login.swift new file mode 100644 index 000000000..bb8bc344d --- /dev/null +++ b/iOS/airbnb/airbnb/Sources/Model/Login.swift @@ -0,0 +1,38 @@ +// +// Login.swift +// airbnb +// +// Created by Jihee hwang on 2022/06/09. +// + +import UIKit +import Alamofire + +class LoginManager { + + static let shared = LoginManager() + + private let clientId = "3cc980e29d87204c53ed" + private let clientSecret = "" + + func requestCode() { + let scope = "user,email" // 사용자의 깃헙에서 접근하려고 하는 위치. default는 empty list + let urlString = "https://github.com/login/oauth/authorize?client_id=\(clientId)&scope=\(scope)" + if let url = URL(string: urlString), UIApplication.shared.canOpenURL(url) { UIApplication.shared.open(url) } + } + + // Access Token 서버에 보내주기 + func requestAccessToken(with code: String) { + let url = "https://github.com/login/oauth/access_token" + let parameters = ["client_id": clientId, + "client_secret": clientSecret, + "code": code] + + let headers: HTTPHeaders = ["Accept": "application/json"] + let dataRequest = AF.request(url, + method: .post, + parameters: parameters, + encoding: JSONEncoding.default, + headers: headers) + } +} From 8e8b9f213fccecf2746caac60b8abec2570eddb2 Mon Sep 17 00:00:00 2001 From: Jihee hwang Date: Fri, 10 Jun 2022 14:26:25 +0900 Subject: [PATCH 9/9] =?UTF-8?q?feat:=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20?= =?UTF-8?q?=EA=B8=B0=EB=8A=A5=20=EA=B5=AC=ED=98=84=20=EB=B0=8F=20Pod=20->?= =?UTF-8?q?=20SPM=20=EC=9C=BC=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- iOS/airbnb/airbnb.xcodeproj/project.pbxproj | 459 ++---------------- .../xcshareddata/swiftpm/Package.resolved | 18 + .../contents.xcworkspacedata | 10 - .../xcshareddata/IDEWorkspaceChecks.plist | 8 - .../GitHub_Logo.imageset/Contents.json | 21 + .../GitHub_Logo.imageset/GitHub-Emblem.png | Bin 0 -> 1837 bytes .../Google_Logo.imageset/Contents.json | 21 + .../Google_Logo.imageset/Google_Logo.png | Bin 0 -> 1516 bytes .../Controller/HomeViewController.swift | 5 +- .../Controller/LoginViewController.swift | 42 +- iOS/airbnb/airbnbTests/airbnbTests.swift | 36 -- iOS/airbnb/airbnbUITests/airbnbUITests.swift | 41 -- .../airbnbUITestsLaunchTests.swift | 32 -- 13 files changed, 140 insertions(+), 553 deletions(-) rename iOS/airbnb/{airbnb.xcworkspace => airbnb.xcodeproj/project.xcworkspace}/xcshareddata/swiftpm/Package.resolved (52%) delete mode 100644 iOS/airbnb/airbnb.xcworkspace/contents.xcworkspacedata delete mode 100644 iOS/airbnb/airbnb.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 iOS/airbnb/airbnb/Resources/Assets.xcassets/GitHub_Logo.imageset/Contents.json create mode 100644 iOS/airbnb/airbnb/Resources/Assets.xcassets/GitHub_Logo.imageset/GitHub-Emblem.png create mode 100644 iOS/airbnb/airbnb/Resources/Assets.xcassets/Google_Logo.imageset/Contents.json create mode 100644 iOS/airbnb/airbnb/Resources/Assets.xcassets/Google_Logo.imageset/Google_Logo.png delete mode 100644 iOS/airbnb/airbnbTests/airbnbTests.swift delete mode 100644 iOS/airbnb/airbnbUITests/airbnbUITests.swift delete mode 100644 iOS/airbnb/airbnbUITests/airbnbUITestsLaunchTests.swift diff --git a/iOS/airbnb/airbnb.xcodeproj/project.pbxproj b/iOS/airbnb/airbnb.xcodeproj/project.pbxproj index 27e180080..b46600efd 100644 --- a/iOS/airbnb/airbnb.xcodeproj/project.pbxproj +++ b/iOS/airbnb/airbnb.xcodeproj/project.pbxproj @@ -7,7 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 1DEF879FF49710DE9E378A0B /* Pods_airbnbTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 17879D07A8010A4E6A2147BE /* Pods_airbnbTests.framework */; }; 731674C8284E095100ABC303 /* SearchTableViewDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 731674C7284E095100ABC303 /* SearchTableViewDataSource.swift */; }; 73202EF02844B63B006D53AE /* SearchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73202EEF2844B63B006D53AE /* SearchViewController.swift */; }; 73202EF62844B79A006D53AE /* CityViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73202EF52844B79A006D53AE /* CityViewCell.swift */; }; @@ -20,6 +19,10 @@ 73571FD0283E1706002F411F /* MyReservationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73571FCF283E1706002F411F /* MyReservationViewController.swift */; }; 73571FD4283F4621002F411F /* Common.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73571FD3283F4621002F411F /* Common.swift */; }; 73571FD82840605D002F411F /* RecommendedTravelDestinationCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73571FD72840605D002F411F /* RecommendedTravelDestinationCell.swift */; }; + 7369F017285305000052C31B /* Login.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7369F016285305000052C31B /* Login.swift */; }; + 7369F0192853052D0052C31B /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7369F0182853052D0052C31B /* LoginViewController.swift */; }; + 7369F01C285305E50052C31B /* SnapKit in Frameworks */ = {isa = PBXBuildFile; productRef = 7369F01B285305E50052C31B /* SnapKit */; }; + 7369F01F285305F60052C31B /* Alamofire in Frameworks */ = {isa = PBXBuildFile; productRef = 7369F01E285305F60052C31B /* Alamofire */; }; 736ADC61284F1936000B5609 /* CalendarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 736ADC60284F1936000B5609 /* CalendarViewController.swift */; }; 7374B81C285044B500BAB4F4 /* FSCalendar in Frameworks */ = {isa = PBXBuildFile; productRef = 7374B81B285044B500BAB4F4 /* FSCalendar */; }; 7388ABE128488D690036D8CE /* HomeCollectionViewDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7388ABE028488D690036D8CE /* HomeCollectionViewDataSource.swift */; }; @@ -30,36 +33,9 @@ 73B9A769283C7EE8003A8C25 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73B9A768283C7EE8003A8C25 /* SceneDelegate.swift */; }; 73B9A770283C7EE9003A8C25 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 73B9A76F283C7EE9003A8C25 /* Assets.xcassets */; }; 73B9A773283C7EE9003A8C25 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 73B9A771283C7EE9003A8C25 /* LaunchScreen.storyboard */; }; - 73B9A77E283C7EE9003A8C25 /* airbnbTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73B9A77D283C7EE9003A8C25 /* airbnbTests.swift */; }; - 73B9A788283C7EE9003A8C25 /* airbnbUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73B9A787283C7EE9003A8C25 /* airbnbUITests.swift */; }; - 73B9A78A283C7EE9003A8C25 /* airbnbUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73B9A789283C7EE9003A8C25 /* airbnbUITestsLaunchTests.swift */; }; - CB4B17F8D1F87148B26CE515 /* Pods_airbnb.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8A4BF6044F53897DD91F8DBA /* Pods_airbnb.framework */; }; - EAE990BDC3DC28FBFBB98BBB /* Pods_airbnb_airbnbUITests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 33333B162F71890F03CF46CA /* Pods_airbnb_airbnbUITests.framework */; }; /* End PBXBuildFile section */ -/* Begin PBXContainerItemProxy section */ - 73B9A77A283C7EE9003A8C25 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 73B9A75B283C7EE8003A8C25 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 73B9A762283C7EE8003A8C25; - remoteInfo = airbnb; - }; - 73B9A784283C7EE9003A8C25 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 73B9A75B283C7EE8003A8C25 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 73B9A762283C7EE8003A8C25; - remoteInfo = airbnb; - }; -/* End PBXContainerItemProxy section */ - /* Begin PBXFileReference section */ - 17879D07A8010A4E6A2147BE /* Pods_airbnbTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_airbnbTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 33333B162F71890F03CF46CA /* Pods_airbnb_airbnbUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_airbnb_airbnbUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 4C8FBDEFF1B39C5BD4366F89 /* Pods-airbnb-airbnbUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-airbnb-airbnbUITests.debug.xcconfig"; path = "Target Support Files/Pods-airbnb-airbnbUITests/Pods-airbnb-airbnbUITests.debug.xcconfig"; sourceTree = ""; }; - 4D0E80456C281DE34190974F /* Pods-airbnb.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-airbnb.debug.xcconfig"; path = "Target Support Files/Pods-airbnb/Pods-airbnb.debug.xcconfig"; sourceTree = ""; }; - 4E46533D09A96A3749B72362 /* Pods-airbnb-airbnbUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-airbnb-airbnbUITests.release.xcconfig"; path = "Target Support Files/Pods-airbnb-airbnbUITests/Pods-airbnb-airbnbUITests.release.xcconfig"; sourceTree = ""; }; 731674C7284E095100ABC303 /* SearchTableViewDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchTableViewDataSource.swift; sourceTree = ""; }; 73202EEF2844B63B006D53AE /* SearchViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = SearchViewController.swift; path = "/Users/jiheesmac/Masters 2022/0523-0610/airbnb-Team01/iOS/airbnb/airbnb/Sources/Controller/SearchViewController.swift"; sourceTree = ""; }; 73202EF52844B79A006D53AE /* CityViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CityViewCell.swift; sourceTree = ""; }; @@ -72,6 +48,8 @@ 73571FCF283E1706002F411F /* MyReservationViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyReservationViewController.swift; sourceTree = ""; }; 73571FD3283F4621002F411F /* Common.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Common.swift; sourceTree = ""; }; 73571FD72840605D002F411F /* RecommendedTravelDestinationCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecommendedTravelDestinationCell.swift; sourceTree = ""; }; + 7369F016285305000052C31B /* Login.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Login.swift; sourceTree = ""; }; + 7369F0182853052D0052C31B /* LoginViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; 736ADC60284F1936000B5609 /* CalendarViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CalendarViewController.swift; sourceTree = ""; }; 7388ABE028488D690036D8CE /* HomeCollectionViewDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeCollectionViewDataSource.swift; sourceTree = ""; }; 7388ABEA2848ED230036D8CE /* LocationTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocationTableViewCell.swift; sourceTree = ""; }; @@ -82,16 +60,7 @@ 73B9A76F283C7EE9003A8C25 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 73B9A772283C7EE9003A8C25 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 73B9A774283C7EE9003A8C25 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 73B9A779283C7EE9003A8C25 /* airbnbTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = airbnbTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 73B9A77D283C7EE9003A8C25 /* airbnbTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = airbnbTests.swift; sourceTree = ""; }; - 73B9A783283C7EE9003A8C25 /* airbnbUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = airbnbUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 73B9A787283C7EE9003A8C25 /* airbnbUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = airbnbUITests.swift; sourceTree = ""; }; - 73B9A789283C7EE9003A8C25 /* airbnbUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = airbnbUITestsLaunchTests.swift; sourceTree = ""; }; 73B9A799283CAF42003A8C25 /* .swiftlint.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = .swiftlint.yml; sourceTree = ""; }; - 7836D9CC6C05249FEB90D865 /* Pods-airbnbTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-airbnbTests.debug.xcconfig"; path = "Target Support Files/Pods-airbnbTests/Pods-airbnbTests.debug.xcconfig"; sourceTree = ""; }; - 8A4BF6044F53897DD91F8DBA /* Pods_airbnb.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_airbnb.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 9BF72032FAB7DF90E6065147 /* Pods-airbnbTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-airbnbTests.release.xcconfig"; path = "Target Support Files/Pods-airbnbTests/Pods-airbnbTests.release.xcconfig"; sourceTree = ""; }; - 9EF20E1C07BB38ADA9E5704F /* Pods-airbnb.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-airbnb.release.xcconfig"; path = "Target Support Files/Pods-airbnb/Pods-airbnb.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -99,25 +68,10 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 7369F01F285305F60052C31B /* Alamofire in Frameworks */, 738CB7EB284EFD8C0009B17D /* HorizonCalendar in Frameworks */, + 7369F01C285305E50052C31B /* SnapKit in Frameworks */, 7374B81C285044B500BAB4F4 /* FSCalendar in Frameworks */, - CB4B17F8D1F87148B26CE515 /* Pods_airbnb.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 73B9A776283C7EE9003A8C25 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1DEF879FF49710DE9E378A0B /* Pods_airbnbTests.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 73B9A780283C7EE9003A8C25 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - EAE990BDC3DC28FBFBB98BBB /* Pods_airbnb_airbnbUITests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -162,6 +116,7 @@ 73571FCF283E1706002F411F /* MyReservationViewController.swift */, 73202EEF2844B63B006D53AE /* SearchViewController.swift */, 736ADC60284F1936000B5609 /* CalendarViewController.swift */, + 7369F0182853052D0052C31B /* LoginViewController.swift */, ); path = Controller; sourceTree = ""; @@ -171,11 +126,7 @@ children = ( 73B9A799283CAF42003A8C25 /* .swiftlint.yml */, 73B9A765283C7EE8003A8C25 /* airbnb */, - 73B9A77C283C7EE9003A8C25 /* airbnbTests */, - 73B9A786283C7EE9003A8C25 /* airbnbUITests */, 73B9A764283C7EE8003A8C25 /* Products */, - 93000A4293A0D8B457566CAC /* Pods */, - 9B5362D7D22484613C1A85EF /* Frameworks */, ); sourceTree = ""; }; @@ -183,8 +134,6 @@ isa = PBXGroup; children = ( 73B9A763283C7EE8003A8C25 /* airbnb.app */, - 73B9A779283C7EE9003A8C25 /* airbnbTests.xctest */, - 73B9A783283C7EE9003A8C25 /* airbnbUITests.xctest */, ); name = Products; sourceTree = ""; @@ -199,23 +148,6 @@ path = airbnb; sourceTree = ""; }; - 73B9A77C283C7EE9003A8C25 /* airbnbTests */ = { - isa = PBXGroup; - children = ( - 73B9A77D283C7EE9003A8C25 /* airbnbTests.swift */, - ); - path = airbnbTests; - sourceTree = ""; - }; - 73B9A786283C7EE9003A8C25 /* airbnbUITests */ = { - isa = PBXGroup; - children = ( - 73B9A787283C7EE9003A8C25 /* airbnbUITests.swift */, - 73B9A789283C7EE9003A8C25 /* airbnbUITestsLaunchTests.swift */, - ); - path = airbnbUITests; - sourceTree = ""; - }; 73B9A79B283CC522003A8C25 /* Resources */ = { isa = PBXGroup; children = ( @@ -243,34 +175,12 @@ 73DF7541284908A600ACEA51 /* Model */ = { isa = PBXGroup; children = ( + 7369F016285305000052C31B /* Login.swift */, 73202EF92845DAB6006D53AE /* CityData.swift */, ); path = Model; sourceTree = ""; }; - 93000A4293A0D8B457566CAC /* Pods */ = { - isa = PBXGroup; - children = ( - 4D0E80456C281DE34190974F /* Pods-airbnb.debug.xcconfig */, - 9EF20E1C07BB38ADA9E5704F /* Pods-airbnb.release.xcconfig */, - 4C8FBDEFF1B39C5BD4366F89 /* Pods-airbnb-airbnbUITests.debug.xcconfig */, - 4E46533D09A96A3749B72362 /* Pods-airbnb-airbnbUITests.release.xcconfig */, - 7836D9CC6C05249FEB90D865 /* Pods-airbnbTests.debug.xcconfig */, - 9BF72032FAB7DF90E6065147 /* Pods-airbnbTests.release.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; - 9B5362D7D22484613C1A85EF /* Frameworks */ = { - isa = PBXGroup; - children = ( - 8A4BF6044F53897DD91F8DBA /* Pods_airbnb.framework */, - 33333B162F71890F03CF46CA /* Pods_airbnb_airbnbUITests.framework */, - 17879D07A8010A4E6A2147BE /* Pods_airbnbTests.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -278,12 +188,9 @@ isa = PBXNativeTarget; buildConfigurationList = 73B9A78D283C7EE9003A8C25 /* Build configuration list for PBXNativeTarget "airbnb" */; buildPhases = ( - 8716BA333AF0390170FBF096 /* [CP] Check Pods Manifest.lock */, - 73B9A796283C818C003A8C25 /* Run SwiftLint */, 73B9A75F283C7EE8003A8C25 /* Sources */, 73B9A760283C7EE8003A8C25 /* Frameworks */, 73B9A761283C7EE8003A8C25 /* Resources */, - 0A6206B9D207997DC4391D9E /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -293,50 +200,13 @@ packageProductDependencies = ( 738CB7EA284EFD8C0009B17D /* HorizonCalendar */, 7374B81B285044B500BAB4F4 /* FSCalendar */, + 7369F01B285305E50052C31B /* SnapKit */, + 7369F01E285305F60052C31B /* Alamofire */, ); productName = airbnb; productReference = 73B9A763283C7EE8003A8C25 /* airbnb.app */; productType = "com.apple.product-type.application"; }; - 73B9A778283C7EE9003A8C25 /* airbnbTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 73B9A790283C7EE9003A8C25 /* Build configuration list for PBXNativeTarget "airbnbTests" */; - buildPhases = ( - 44660C74979A876E525D3AA9 /* [CP] Check Pods Manifest.lock */, - 73B9A775283C7EE9003A8C25 /* Sources */, - 73B9A776283C7EE9003A8C25 /* Frameworks */, - 73B9A777283C7EE9003A8C25 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 73B9A77B283C7EE9003A8C25 /* PBXTargetDependency */, - ); - name = airbnbTests; - productName = airbnbTests; - productReference = 73B9A779283C7EE9003A8C25 /* airbnbTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 73B9A782283C7EE9003A8C25 /* airbnbUITests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 73B9A793283C7EE9003A8C25 /* Build configuration list for PBXNativeTarget "airbnbUITests" */; - buildPhases = ( - 72AFB6347D29703523627161 /* [CP] Check Pods Manifest.lock */, - 73B9A77F283C7EE9003A8C25 /* Sources */, - 73B9A780283C7EE9003A8C25 /* Frameworks */, - 73B9A781283C7EE9003A8C25 /* Resources */, - DC6CE36F4E6F22032FABA1A1 /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 73B9A785283C7EE9003A8C25 /* PBXTargetDependency */, - ); - name = airbnbUITests; - productName = airbnbUITests; - productReference = 73B9A783283C7EE9003A8C25 /* airbnbUITests.xctest */; - productType = "com.apple.product-type.bundle.ui-testing"; - }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -350,14 +220,6 @@ 73B9A762283C7EE8003A8C25 = { CreatedOnToolsVersion = 13.4; }; - 73B9A778283C7EE9003A8C25 = { - CreatedOnToolsVersion = 13.4; - TestTargetID = 73B9A762283C7EE8003A8C25; - }; - 73B9A782283C7EE9003A8C25 = { - CreatedOnToolsVersion = 13.4; - TestTargetID = 73B9A762283C7EE8003A8C25; - }; }; }; buildConfigurationList = 73B9A75E283C7EE8003A8C25 /* Build configuration list for PBXProject "airbnb" */; @@ -372,14 +234,14 @@ packageReferences = ( 738CB7E9284EFD8C0009B17D /* XCRemoteSwiftPackageReference "HorizonCalendar" */, 7374B81A285044B500BAB4F4 /* XCRemoteSwiftPackageReference "FSCalendar" */, + 7369F01A285305E50052C31B /* XCRemoteSwiftPackageReference "SnapKit" */, + 7369F01D285305F60052C31B /* XCRemoteSwiftPackageReference "Alamofire" */, ); productRefGroup = 73B9A764283C7EE8003A8C25 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( 73B9A762283C7EE8003A8C25 /* airbnb */, - 73B9A778283C7EE9003A8C25 /* airbnbTests */, - 73B9A782283C7EE9003A8C25 /* airbnbUITests */, ); }; /* End PBXProject section */ @@ -394,143 +256,8 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 73B9A777283C7EE9003A8C25 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 73B9A781283C7EE9003A8C25 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXResourcesBuildPhase section */ -/* Begin PBXShellScriptBuildPhase section */ - 0A6206B9D207997DC4391D9E /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-airbnb/Pods-airbnb-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-airbnb/Pods-airbnb-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-airbnb/Pods-airbnb-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 44660C74979A876E525D3AA9 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-airbnbTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 72AFB6347D29703523627161 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-airbnb-airbnbUITests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 73B9A796283C818C003A8C25 /* Run SwiftLint */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 12; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - name = "Run SwiftLint"; - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "# Type a script or drag a script file from your workspace to insert its path.\n\"${PODS_ROOT}/SwiftLint/swiftlint\"\n"; - }; - 8716BA333AF0390170FBF096 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-airbnb-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - DC6CE36F4E6F22032FABA1A1 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-airbnb-airbnbUITests/Pods-airbnb-airbnbUITests-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-airbnb-airbnbUITests/Pods-airbnb-airbnbUITests-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-airbnb-airbnbUITests/Pods-airbnb-airbnbUITests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - /* Begin PBXSourcesBuildPhase section */ 73B9A75F283C7EE8003A8C25 /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -544,11 +271,13 @@ 73571FC2283DFB18002F411F /* UIColor+Extention.swift in Sources */, 73B9A767283C7EE8003A8C25 /* AppDelegate.swift in Sources */, 73571FC6283E0CEF002F411F /* HeroImageCell.swift in Sources */, + 7369F0192853052D0052C31B /* LoginViewController.swift in Sources */, 73571FD4283F4621002F411F /* Common.swift in Sources */, 7388ABE128488D690036D8CE /* HomeCollectionViewDataSource.swift in Sources */, 73B9A769283C7EE8003A8C25 /* SceneDelegate.swift in Sources */, 73202EF02844B63B006D53AE /* SearchViewController.swift in Sources */, 73571FCB283E16A0002F411F /* HomeViewController.swift in Sources */, + 7369F017285305000052C31B /* Login.swift in Sources */, 7388ABEB2848ED230036D8CE /* LocationTableViewCell.swift in Sources */, 73B579C3284098C50043465D /* CollectionHeaderView.swift in Sources */, 73571FCE283E16E9002F411F /* WishListViewController.swift in Sources */, @@ -557,38 +286,8 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 73B9A775283C7EE9003A8C25 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 73B9A77E283C7EE9003A8C25 /* airbnbTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 73B9A77F283C7EE9003A8C25 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 73B9A78A283C7EE9003A8C25 /* airbnbUITestsLaunchTests.swift in Sources */, - 73B9A788283C7EE9003A8C25 /* airbnbUITests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXSourcesBuildPhase section */ -/* Begin PBXTargetDependency section */ - 73B9A77B283C7EE9003A8C25 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 73B9A762283C7EE8003A8C25 /* airbnb */; - targetProxy = 73B9A77A283C7EE9003A8C25 /* PBXContainerItemProxy */; - }; - 73B9A785283C7EE9003A8C25 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 73B9A762283C7EE8003A8C25 /* airbnb */; - targetProxy = 73B9A784283C7EE9003A8C25 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - /* Begin PBXVariantGroup section */ 73B9A771283C7EE9003A8C25 /* LaunchScreen.storyboard */ = { isa = PBXVariantGroup; @@ -717,7 +416,6 @@ }; 73B9A78E283C7EE9003A8C25 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 4D0E80456C281DE34190974F /* Pods-airbnb.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; @@ -745,7 +443,6 @@ }; 73B9A78F283C7EE9003A8C25 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 9EF20E1C07BB38ADA9E5704F /* Pods-airbnb.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; @@ -771,86 +468,6 @@ }; name = Release; }; - 73B9A791283C7EE9003A8C25 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7836D9CC6C05249FEB90D865 /* Pods-airbnbTests.debug.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - BUNDLE_LOADER = "$(TEST_HOST)"; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 6Y9V523M6R; - GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 15.5; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.jihee.airbnbTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_EMIT_LOC_STRINGS = NO; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/airbnb.app/airbnb"; - }; - name = Debug; - }; - 73B9A792283C7EE9003A8C25 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9BF72032FAB7DF90E6065147 /* Pods-airbnbTests.release.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - BUNDLE_LOADER = "$(TEST_HOST)"; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 6Y9V523M6R; - GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 15.5; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.jihee.airbnbTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_EMIT_LOC_STRINGS = NO; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/airbnb.app/airbnb"; - }; - name = Release; - }; - 73B9A794283C7EE9003A8C25 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 4C8FBDEFF1B39C5BD4366F89 /* Pods-airbnb-airbnbUITests.debug.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 6Y9V523M6R; - GENERATE_INFOPLIST_FILE = YES; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.jihee.airbnbUITests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_EMIT_LOC_STRINGS = NO; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_TARGET_NAME = airbnb; - }; - name = Debug; - }; - 73B9A795283C7EE9003A8C25 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 4E46533D09A96A3749B72362 /* Pods-airbnb-airbnbUITests.release.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 6Y9V523M6R; - GENERATE_INFOPLIST_FILE = YES; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.jihee.airbnbUITests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_EMIT_LOC_STRINGS = NO; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_TARGET_NAME = airbnb; - }; - name = Release; - }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -872,27 +489,25 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 73B9A790283C7EE9003A8C25 /* Build configuration list for PBXNativeTarget "airbnbTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 73B9A791283C7EE9003A8C25 /* Debug */, - 73B9A792283C7EE9003A8C25 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 73B9A793283C7EE9003A8C25 /* Build configuration list for PBXNativeTarget "airbnbUITests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 73B9A794283C7EE9003A8C25 /* Debug */, - 73B9A795283C7EE9003A8C25 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ + 7369F01A285305E50052C31B /* XCRemoteSwiftPackageReference "SnapKit" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/SnapKit/SnapKit.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 5.0.1; + }; + }; + 7369F01D285305F60052C31B /* XCRemoteSwiftPackageReference "Alamofire" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/Alamofire/Alamofire.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 5.6.1; + }; + }; 7374B81A285044B500BAB4F4 /* XCRemoteSwiftPackageReference "FSCalendar" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/WenchaoD/FSCalendar.git"; @@ -912,6 +527,16 @@ /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ + 7369F01B285305E50052C31B /* SnapKit */ = { + isa = XCSwiftPackageProductDependency; + package = 7369F01A285305E50052C31B /* XCRemoteSwiftPackageReference "SnapKit" */; + productName = SnapKit; + }; + 7369F01E285305F60052C31B /* Alamofire */ = { + isa = XCSwiftPackageProductDependency; + package = 7369F01D285305F60052C31B /* XCRemoteSwiftPackageReference "Alamofire" */; + productName = Alamofire; + }; 7374B81B285044B500BAB4F4 /* FSCalendar */ = { isa = XCSwiftPackageProductDependency; package = 7374B81A285044B500BAB4F4 /* XCRemoteSwiftPackageReference "FSCalendar" */; diff --git a/iOS/airbnb/airbnb.xcworkspace/xcshareddata/swiftpm/Package.resolved b/iOS/airbnb/airbnb.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved similarity index 52% rename from iOS/airbnb/airbnb.xcworkspace/xcshareddata/swiftpm/Package.resolved rename to iOS/airbnb/airbnb.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 5ca32f661..d2c6983fc 100644 --- a/iOS/airbnb/airbnb.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/iOS/airbnb/airbnb.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,5 +1,14 @@ { "pins" : [ + { + "identity" : "alamofire", + "kind" : "remoteSourceControl", + "location" : "https://github.com/Alamofire/Alamofire.git", + "state" : { + "revision" : "354dda32d89fc8cd4f5c46487f64957d355f53d8", + "version" : "5.6.1" + } + }, { "identity" : "fscalendar", "kind" : "remoteSourceControl", @@ -17,6 +26,15 @@ "revision" : "93b188c52650b3999eeb20cf256b69715de515ef", "version" : "1.13.4" } + }, + { + "identity" : "snapkit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/SnapKit/SnapKit.git", + "state" : { + "revision" : "f222cbdf325885926566172f6f5f06af95473158", + "version" : "5.6.0" + } } ], "version" : 2 diff --git a/iOS/airbnb/airbnb.xcworkspace/contents.xcworkspacedata b/iOS/airbnb/airbnb.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index ce9b034bd..000000000 --- a/iOS/airbnb/airbnb.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/iOS/airbnb/airbnb.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/iOS/airbnb/airbnb.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/iOS/airbnb/airbnb.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/iOS/airbnb/airbnb/Resources/Assets.xcassets/GitHub_Logo.imageset/Contents.json b/iOS/airbnb/airbnb/Resources/Assets.xcassets/GitHub_Logo.imageset/Contents.json new file mode 100644 index 000000000..08110e7ac --- /dev/null +++ b/iOS/airbnb/airbnb/Resources/Assets.xcassets/GitHub_Logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "GitHub-Emblem.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/iOS/airbnb/airbnb/Resources/Assets.xcassets/GitHub_Logo.imageset/GitHub-Emblem.png b/iOS/airbnb/airbnb/Resources/Assets.xcassets/GitHub_Logo.imageset/GitHub-Emblem.png new file mode 100644 index 0000000000000000000000000000000000000000..21b2bd0d50dcd3c2733d607ac07f60e15bc234e6 GIT binary patch literal 1837 zcmZ{lX*kpi8^-^lks%HeGb7?45lw@Uu^pMgaKyn`%X^T zYa$0RN(Ms+nJn24BU|sh*Y$pQ-w*GH=l)&y^IZ4W`}xz--1saQ3I+h+EY<{#=g^Ha z*U#{9w5UA8ngbpW1DpW>G(P4(ay`xQ7l|f#901%`0D$ON065^RqL%<52o3-%E&zba z1^{utr)^d`oWrR*X2xjXXZ+*A*Br+ih{a)eSs?IfLEaS!U0nbGX<*R?Hl8zU6W+^60oJXKX{;(Wj#iBh$UW==(F?UMA2jgjF~(m zRy_mimD+1rG3Hr%=2Y2Yj>I!=felDvx1WcEOI&Nfksn);OVt+Tp$!)&^bO6 zUfVf-un{DPIcJ3y{*P?^jIk-u^>R1;81}-p9lSKC>ScTP^1V)t5 zlg>iBc*PB`&9-57z4YUuA<;Tr@s1@?O~N}E%~F4SrX14x?W)4AR@dOAX`d=6 zV?aM*xBX7ZTl{Pr*AMcuz!LjaxHHn8B9n$v*JfGRdD1REe;U;I#Zf3nVT454afuEy zDyHW(J*d$i(ODFEIc0OxrBRToJT_U_I*xVx>-{PeE&E!nyx5!apcrXB0Ou^*&m9Zg%n8Rw|MFegBGd%5$4y_s)dFl?$j6+aB+qI(51 zwO^XFOT_XjeiSf&Sn_C0>-;eMYPK+w{QQ$h)#v34WD`)1cnmiINA z$WfrSExV&n*V}^`7dw zg@k*elFA;6>aE0%-!BU-bbf9;36Zln4D`%fs51E~e%e@Py}?j0Y*e5gr7F^os-)Lv zglX^`ULjI6>C+^PEbMGUk86BKIY_5=%pm;tkXOkjUkjsJC&AA$Zs!o~-F~Ben!Yu*n7DTDoK4W+M`kj~6_$Gh~jj5JRyG{hUVzJ^nIAuE_iyKqYu}aN$m92G1S28RS z%gGK&tKzRoA9i*+3Z_)6PLT zDaFyi7tw^WD5CsqObvJ~$DHM{& zd=$GwujaiKzT>!GTxyO@5ZIlLDYrhetNP`^6ouy3{V7)+%Il-Xd>IL{&lRqAmL_=w znXYUzHOa`gBvJkpi#^45)q)uKL@IhBUGi~;q8SPN2|lWMf6YBaheZ$7Pl=xt zR{3IJ+p-k9Fs{XzQ7Sc5IhMXoKuC;I)7LU1hhCXrq`B`N8vMaJ+{(9Fy_n5nrtaMS znS^MoLt8Ls0$2`hp>?)qP}pcIV|FxmHB7Cx>3vRWre)ovT)>dpmF8vw%%dDP*1~%^ zDPl}PoU(3I{G*Th{WrGuT2)yjW4K=s@#(Vd+{ju=KS@1zJ>W}ouj7sg6}6*VeoJmO z{qK31C*MD0W-)yd_+Uo+0W{w%oN0u$+{m)Gi@}mt&;*IQ`%$PWJ<^ydt=fa1Mu2H*=bO zaZFJfTXRB`?iRy`FJeP+As92$w^K6U`0N@7e7mE-qT3{<3TMYhs$I!dSSX371oz_! z?`cFiD#T(XmrZ6E0+gV1}~ z{#*2}D{;gp%l~aKY;?*u{b7@XZ-I2;9s-zPQ||4)GI>*jSg W?EeS&^}te`0D#4qqw8+C#QY1gVpH}2 literal 0 HcmV?d00001 diff --git a/iOS/airbnb/airbnb/Resources/Assets.xcassets/Google_Logo.imageset/Contents.json b/iOS/airbnb/airbnb/Resources/Assets.xcassets/Google_Logo.imageset/Contents.json new file mode 100644 index 000000000..886557e15 --- /dev/null +++ b/iOS/airbnb/airbnb/Resources/Assets.xcassets/Google_Logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Google_Logo.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/iOS/airbnb/airbnb/Resources/Assets.xcassets/Google_Logo.imageset/Google_Logo.png b/iOS/airbnb/airbnb/Resources/Assets.xcassets/Google_Logo.imageset/Google_Logo.png new file mode 100644 index 0000000000000000000000000000000000000000..d6a41acc6a0fa581b845dfc2937ff83b7b000bd4 GIT binary patch literal 1516 zcmV500001b5ch_0Itp) z=>Px)rb$FWR9Hv7n0ri9R~W#*dub`X6k1yfRKQ9Vi})xQnNE`VTy!dd$mZ0|w{tod zHa86n=ax7(U!YT5=H^7A4rRs(f)P92oX!9~7)${{p{_g%<<)mfY42Uiq(ge!+lIRH zSJU%7e*Mll-=he4xWoYr@v9up!g!AV3^B%x5iscCm=DS#00^DMqH5~xYkH(JJt$La z|G3s;C~h(sTHSSlxG6|mA>b|F7#^HDfyJEarVbDQ_^oc8^jLFy<}Y39>r{G_FmrkA zd3&P5vm=>|Xewi__HXxSrQ2%d?>*`5ZEz;%3dT2UTtwEYF#Z+*poDe@)QID{^!nya zd5X>-$>d3$i~wMtnIbNHiS0kr9Ved3tgDeF7Pa>j57l#k;RCSprbb_j4Zx;(>ck!S z3rbb)rs~G^0Dx1$pg&2*7R=@bCc0zznGCM8;u;hI9}GnUTl7n!ZX z(Crzbk^8AYI?a8Gvu)iu(hhA=nMP9u04AFb7a&l=W5*{2vtM5l%w5SuQU3v3t|BrZ zV}}{bV2t^Fddx##6!CKgW5EgYVYzbmURg^f02p0C^Zg+-OC&n-S`g7djjIAZ2vKRy#>wOl0tlJ`)sb@f#GTdfaSmIw7srreQs+w zmA83Ba&g7zYRpE=p_}4nJWtF6bzT1W#TepySmrU@R0_4z# zNAQoRoOlDK_0A7Rkuy8clW)!?){r^ecb3@o>2dh{|A1+$%s=TeGDj~W2e)S9{ZHQ2 z@NR--rct^p-D#dtQ;dfbM~ zHxZOZC)=0bJhZ2=WM_uGG{2lC$u~_IifE6S>;LEYNbd0jDJ{cZ0y>it8{FH zt*kgMg0PkzjuZDPpETHE7!m9-(R*h-L}@-wJ3YcmnAjp}qYaO4CtOc&_@)Tg&?k<>1ZG6!CV!(g~D3utn3W=)CcFj_OZEk+G)B-U9;w z7C4?e8JiS3KWMgaEuG60A~*(2 zXYGi0;8zJlr^k>A) + var config = UIButton.Configuration.bordered() + config.baseBackgroundColor = .white + config.cornerStyle = .capsule + config.background.cornerRadius = 20 + config.background.strokeColor = .line + config.baseForegroundColor = .black + config.image = UIImage(named: "GitHub_Logo") + config.imagePadding = 10 + config.imagePlacement = .leading + + let button = UIButton(configuration: config) + button.addTarget(self, action: #selector(didTabGithubLogin(_:)), for: .touchUpInside) return button }() - let googleLoginButton: UIButton = { + private let googleLoginButton: UIButton = { var config = UIButton.Configuration.bordered() config.baseBackgroundColor = .white config.cornerStyle = .capsule config.background.cornerRadius = 20 - config.background.strokeColor = .grey3 - config.title = "구글 로그인" + config.background.strokeColor = .line config.baseForegroundColor = .black config.image = UIImage(named: "Google_Logo") config.imagePadding = 10 config.imagePlacement = .leading - + let button = UIButton(configuration: config) + button.addTarget(self, action: #selector(didTabGithubLogin(_:)), for: .touchUpInside) return button }() @@ -48,10 +58,30 @@ final class LoginViewController: UIViewController { private func layout() { view.addSubview(UIComponents.navigationBarUnderLineView) + view.addSubview(gitHubLoginButton) + view.addSubview(googleLoginButton) UIComponents.navigationBarUnderLineView.snp.makeConstraints { $0.top.leading.trailing.equalTo(view.safeAreaLayoutGuide) $0.height.equalTo(1) } + + gitHubLoginButton.snp.makeConstraints { + $0.centerX.equalToSuperview() + $0.centerY.equalToSuperview().offset(-40) + $0.width.equalTo(300) + $0.height.equalTo(60) + } + + googleLoginButton.snp.makeConstraints { + $0.centerX.equalToSuperview() + $0.centerY.equalToSuperview().offset(40) + $0.width.equalTo(300) + $0.height.equalTo(60) + } + } + + @objc func didTabGithubLogin(_ sender: Any) { + LoginManager.shared.requestCode() } } diff --git a/iOS/airbnb/airbnbTests/airbnbTests.swift b/iOS/airbnb/airbnbTests/airbnbTests.swift deleted file mode 100644 index d64b5118e..000000000 --- a/iOS/airbnb/airbnbTests/airbnbTests.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// airbnbTests.swift -// airbnbTests -// -// Created by Jihee hwang on 2022/05/24. -// - -import XCTest -@testable import airbnb - -class airbnbTests: XCTestCase { - - override func setUpWithError() throws { - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDownWithError() throws { - // Put teardown code here. This method is called after the invocation of each test method in the class. - } - - func testExample() throws { - // This is an example of a functional test case. - // Use XCTAssert and related functions to verify your tests produce the correct results. - // Any test you write for XCTest can be annotated as throws and async. - // Mark your test throws to produce an unexpected failure when your test encounters an uncaught error. - // Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards. - } - - func testPerformanceExample() throws { - // This is an example of a performance test case. - self.measure { - // Put the code you want to measure the time of here. - } - } - -} diff --git a/iOS/airbnb/airbnbUITests/airbnbUITests.swift b/iOS/airbnb/airbnbUITests/airbnbUITests.swift deleted file mode 100644 index f02f097bc..000000000 --- a/iOS/airbnb/airbnbUITests/airbnbUITests.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// airbnbUITests.swift -// airbnbUITests -// -// Created by Jihee hwang on 2022/05/24. -// - -import XCTest - -class airbnbUITests: XCTestCase { - - override func setUpWithError() throws { - // Put setup code here. This method is called before the invocation of each test method in the class. - - // In UI tests it is usually best to stop immediately when a failure occurs. - continueAfterFailure = false - - // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. - } - - override func tearDownWithError() throws { - // Put teardown code here. This method is called after the invocation of each test method in the class. - } - - func testExample() throws { - // UI tests must launch the application that they test. - let app = XCUIApplication() - app.launch() - - // Use XCTAssert and related functions to verify your tests produce the correct results. - } - - func testLaunchPerformance() throws { - if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) { - // This measures how long it takes to launch your application. - measure(metrics: [XCTApplicationLaunchMetric()]) { - XCUIApplication().launch() - } - } - } -} diff --git a/iOS/airbnb/airbnbUITests/airbnbUITestsLaunchTests.swift b/iOS/airbnb/airbnbUITests/airbnbUITestsLaunchTests.swift deleted file mode 100644 index d05cc6ac3..000000000 --- a/iOS/airbnb/airbnbUITests/airbnbUITestsLaunchTests.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// airbnbUITestsLaunchTests.swift -// airbnbUITests -// -// Created by Jihee hwang on 2022/05/24. -// - -import XCTest - -class airbnbUITestsLaunchTests: XCTestCase { - - override class var runsForEachTargetApplicationUIConfiguration: Bool { - true - } - - override func setUpWithError() throws { - continueAfterFailure = false - } - - func testLaunch() throws { - let app = XCUIApplication() - app.launch() - - // Insert steps here to perform after app launch but before taking a screenshot, - // such as logging into a test account or navigating somewhere in the app - - let attachment = XCTAttachment(screenshot: app.screenshot()) - attachment.name = "Launch Screen" - attachment.lifetime = .keepAlways - add(attachment) - } -}