Skip to content

Commit

Permalink
bug: 🐞navigation & tabBar load 시점 수정(#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lia316 committed Jun 3, 2021
1 parent 7ff44a3 commit d069669
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 5 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ extension CalendarViewController {
extension CalendarViewController {

func configureToolBar() {
self.tabBarController?.tabBar.isHidden = true
let toolbar = UIToolbar()
view.addSubview(toolbar)

Expand Down
20 changes: 17 additions & 3 deletions iOS/Airbnb/Airbnb/ConditionPage/People/PeopleViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ extension PeopleViewController {
extension PeopleViewController {

private func configureToolBar() {
self.tabBarController?.tabBar.isHidden = true
let toolbar = UIToolbar()
view.addSubview(toolbar)

Expand All @@ -106,8 +105,8 @@ extension PeopleViewController {
])

let flexibleSpace = UIBarButtonItem(barButtonSystemItem: .flexibleSpace, target: self, action: nil)
let toolbarItem1 = UIBarButtonItem(title: "건너뛰기", style: .plain, target: self, action: nil)
let toolbarItem2 = UIBarButtonItem(title: "다음", style: .done, target: self, action: nil)
let toolbarItem1 = UIBarButtonItem(title: "건너뛰기", style: .plain, target: self, action: #selector(nextButtonPressed))
let toolbarItem2 = UIBarButtonItem(title: "다음", style: .done, target: self, action: #selector(nextButtonPressed))

let items = [toolbarItem1, flexibleSpace, toolbarItem2]
items.forEach{ $0.tintColor = .black }
Expand All @@ -122,4 +121,19 @@ extension PeopleViewController {
self.navigationController?.navigationBar.topItem?.backBarButtonItem = backButton
}

@objc func nextButtonPressed() {
let nextVC = RoomsViewController(conditionViewModel: conditionViewModel)
self.navigationController?.pushViewController(nextVC, animated: true)
}

}


extension PeopleViewController {

override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
self.tabBarController?.tabBar.isHidden = true
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ extension PriceViewController {
extension PriceViewController {

private func configureToolBar() {
self.tabBarController?.tabBar.isHidden = true
let toolbar = UIToolbar()
view.addSubview(toolbar)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,12 @@ extension MainPageViewController: UISearchBarDelegate {
}

}


extension MainPageViewController {

override func viewWillAppear(_ animated: Bool) {
self.tabBarController?.tabBar.isHidden = false
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ extension SearchCityViewController: UICollectionViewDelegate {

override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
self.tabBarController?.tabBar.isHidden = true

guard let indexPath = self.collectionView.indexPathsForSelectedItems?.first else { return }
if let coordinator = self.transitionCoordinator {
Expand Down
1 change: 1 addition & 0 deletions iOS/Airbnb/Airbnb/ResultPage/Model/RoomDTO.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import Foundation

struct Rooms: Codable, Hashable {
var rooms : [Room]
let uuid = UUID()
}

struct Room: Codable, Hashable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ extension RoomsViewController: UICollectionViewDelegate {
extension RoomsViewController {

func configureNavigation() {
self.tabBarController?.tabBar.isHidden = false
self.navigationItem.title = "숙소 찾기"
let backButton = UIBarButtonItem()
backButton.title = "Back"
Expand Down

0 comments on commit d069669

Please sign in to comment.