Skip to content

Commit

Permalink
[FEAT] TeamNADA#85 그룹선택 bottomSheet 생성
Browse files Browse the repository at this point in the history
  • Loading branch information
dlwns33 committed Nov 27, 2021
1 parent 43edd7b commit 17de62c
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 5 deletions.
4 changes: 4 additions & 0 deletions NADA-iOS-forRelease.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
39F5A3D1271461EA00191F94 /* BackCardCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 39F5A3CF271461EA00191F94 /* BackCardCell.xib */; };
7705CF3E2752C7DB005195DF /* CardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7705CF3D2752C7DB005195DF /* CardView.swift */; };
7705CF402752C844005195DF /* CardView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7705CF3F2752C844005195DF /* CardView.xib */; };
7713E8482752E2A900724C8B /* SelectGroupBottomSheetViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7713E8472752E2A900724C8B /* SelectGroupBottomSheetViewController.swift */; };
7729171F2743D604001593E0 /* CardsInGroupResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7729171E2743D604001593E0 /* CardsInGroupResponse.swift */; };
77607EDA274A68BE00204CD2 /* GroupCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77607ED8274A68BD00204CD2 /* GroupCollectionViewCell.swift */; };
77607EDB274A68BE00204CD2 /* GroupCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 77607ED9274A68BD00204CD2 /* GroupCollectionViewCell.xib */; };
Expand Down Expand Up @@ -160,6 +161,7 @@
4A2183AE0E469153221624A0 /* Pods_NADA_iOS_forRelease.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_NADA_iOS_forRelease.framework; sourceTree = BUILT_PRODUCTS_DIR; };
7705CF3D2752C7DB005195DF /* CardView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardView.swift; sourceTree = "<group>"; };
7705CF3F2752C844005195DF /* CardView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CardView.xib; sourceTree = "<group>"; };
7713E8472752E2A900724C8B /* SelectGroupBottomSheetViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectGroupBottomSheetViewController.swift; sourceTree = "<group>"; };
7729171E2743D604001593E0 /* CardsInGroupResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardsInGroupResponse.swift; sourceTree = "<group>"; };
77607ED8274A68BD00204CD2 /* GroupCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroupCollectionViewCell.swift; sourceTree = "<group>"; };
77607ED9274A68BD00204CD2 /* GroupCollectionViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GroupCollectionViewCell.xib; sourceTree = "<group>"; };
Expand Down Expand Up @@ -377,6 +379,7 @@
77DFB870274F92F9000CD36F /* AddWithIdBottomSheetViewController.swift */,
398413B6274A7A1E005550BC /* AddGroupBottomSheetViewController.swift */,
77703156275005AA002CBD19 /* CardResultBottomSheetViewController.swift */,
7713E8472752E2A900724C8B /* SelectGroupBottomSheetViewController.swift */,
);
path = BottomSheet;
sourceTree = "<group>";
Expand Down Expand Up @@ -914,6 +917,7 @@
F8C83FBD272F9F430009DF0D /* GenericResponse.swift in Sources */,
398413B7274A7A1E005550BC /* AddGroupBottomSheetViewController.swift in Sources */,
77DFB871274F92F9000CD36F /* AddWithIdBottomSheetViewController.swift in Sources */,
7713E8482752E2A900724C8B /* SelectGroupBottomSheetViewController.swift in Sources */,
39007F2C27080D8200E7143E /* UIViewController+Extension.swift in Sources */,
F8C83FB6272F9E380009DF0D /* UtilService.swift in Sources */,
3958F239270FFBBF00B100B2 /* GroupViewController.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ extension Const {
static let addGroupBottomSheetViewController = "AddGroupBottomSheetViewController"
static let addWithIdBottomSheetViewController = "AddWithIdBottomSheetViewController"
static let cardResultBottomSheetViewController = "CardResultBottomSheetViewController"
static let selectGroupBottomSheetViewController = "SelectGroupBottomSheetViewController"
static let moreViewController = "MoreViewController"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ extension AddWithIdBottomSheetViewController {
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
textField.resignFirstResponder()
// 서버 연결과 더불어... 검색 결과가 없으면 bottomsheet dismiss 하지 말고 hidden 풀어주기
hideBottomSheetAndPresent(nextBottomSheet: CardResultBottomSheetViewController())
hideBottomSheetAndPresent(nextBottomSheet: CardResultBottomSheetViewController(), title: "이채연", height: 574)
return true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import UIKit
import IQKeyboardManagerSwift

class CardResultBottomSheetViewController: CommonBottomSheetViewController, UITextFieldDelegate {
class CardResultBottomSheetViewController: CommonBottomSheetViewController {

// MARK: - Properties
private let groupLabel: UILabel = {
Expand Down Expand Up @@ -72,7 +72,7 @@ class CardResultBottomSheetViewController: CommonBottomSheetViewController, UITe
}

@objc func presentGroupSelectBottomSheet() {
// hideBottomSheetAndPresent(nextBottomSheet: CardResultBottomSheetViewController())
hideBottomSheetAndPresent(nextBottomSheet: SelectGroupBottomSheetViewController(), title: "그룹선택", height: 386)
print("next bottomsheet")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ class CommonBottomSheetViewController: UIViewController {
}

// 바텀 시트 사라지고 바로 다시 다음 바텀 시트 올라오는 애니메이션
func hideBottomSheetAndPresent(nextBottomSheet: CommonBottomSheetViewController) {
func hideBottomSheetAndPresent(nextBottomSheet: CommonBottomSheetViewController, title: String, height: CGFloat) {
let safeAreaHeight = view.safeAreaLayoutGuide.layoutFrame.height
let bottomPadding = view.safeAreaInsets.bottom
bottomSheetViewTopConstraint.constant = safeAreaHeight + bottomPadding
Expand All @@ -205,7 +205,7 @@ class CommonBottomSheetViewController: UIViewController {
if self.presentingViewController != nil {
guard let presentingVC = self.presentingViewController else { return }
self.dismiss(animated: false) {
let nextVC = nextBottomSheet.setTitle("이채연").setHeight(574)
let nextVC = nextBottomSheet.setTitle(title).setHeight(height)
nextVC.modalPresentationStyle = .overFullScreen
presentingVC.present(nextVC, animated: true, completion: nil)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// SelectGroupBottomSheetViewController.swift
// NADA-iOS-forRelease
//
// Created by Yi Joon Choi on 2021/11/28.
//

import UIKit

class SelectGroupBottomSheetViewController: CommonBottomSheetViewController {

override func viewDidLoad() {
super.viewDidLoad()


}

}

0 comments on commit 17de62c

Please sign in to comment.