Skip to content

Commit c41ccfc

Browse files
authored
Merge pull request #131 from teamCA-PIN/feature/#114
Feature/#114
2 parents 285129d + e935257 commit c41ccfc

19 files changed

+58
-34
lines changed

β€ŽCA-PIN_IOS/CA-PIN_IOS/Screens/CafeDetail/ViewControllers/ReportReviewPopUpViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ extension ReportReviewPopUpViewController {
111111
$0.setupButton(title: "μ‹ κ³ ",
112112
color: .white,
113113
font: .notoSansKRRegularFont(fontSize: 16),
114-
backgroundColor: .pointcolor1,
114+
backgroundColor: .maincolor1,
115115
state: .normal,
116116
radius: 0)
117117
$0.addTarget(self, action: #selector(self.reportButtonClicked), for: .touchUpInside)

β€ŽCA-PIN_IOS/CA-PIN_IOS/Screens/Login/ViewControllers/FindPasswordViewController.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ extension FindPasswordViewController {
9898
}, onCompleted: {
9999
}).disposed(by: disposeBag)
100100
}
101+
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
102+
self.view.endEditing(true)
103+
}
101104
func layoutNavigationBarView() {
102105
self.view.add(self.navigationBarView) {
103106
$0.backgroundColor = .clear

β€ŽCA-PIN_IOS/CA-PIN_IOS/Screens/Login/ViewControllers/LoginViewController.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ class LoginViewController: UIViewController {
4545
keyboardObserver()
4646
addAction()
4747
}
48+
49+
override func viewWillAppear(_ animated: Bool) {
50+
self.emailTextField.text = ""
51+
self.passwordTextField.text = ""
52+
}
4853
}
4954

5055
// MARK: - Extensions
@@ -88,6 +93,8 @@ extension LoginViewController {
8893
@objc func loginButtonClicked() {
8994
appDel.isLoginManually = true
9095

96+
self.view.endEditing(true)
97+
9198
guard let emailText = emailTextField.text,
9299
let passwordText = passwordTextField.text else { return }
93100
UserAuthProvider.rx.request(.login(email: emailText, password: passwordText))

β€ŽCA-PIN_IOS/CA-PIN_IOS/Screens/Login/ViewControllers/SignUpViewController.swift

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,29 @@ extension SignUpViewController {
9292
self.passwordTextField.isSecureTextEntry = true
9393
self.checkPasswordTextField.isSecureTextEntry = true
9494
}
95+
func checkPasswordSame() {
96+
/// 일치 뢈일치
97+
guard let passwordText = passwordTextField.text,
98+
let checkPasswordText = checkPasswordTextField.text else { return }
99+
if passwordText != checkPasswordText {
100+
isSame = false
101+
}
102+
else {
103+
isSame = true
104+
enableSignupButton()
105+
}
106+
}
95107
@objc func backButtonClicked() {
96108
self.navigationController?.popViewController(animated: false)
97109
}
98110
@objc func signUpButtonClicked() {
99111
guard let nicknameText = userNameTextField.text,
100112
let emailText = emailTextField.text,
101113
let passwordText = passwordTextField.text else { return }
102-
UserAuthProvider.rx.request(.signup(email: emailText, password: passwordText, nickname: nicknameText))
114+
checkPasswordSame()
115+
if isSame == true {
116+
/// νšŒμ›κ°€μž… μ„œλ²„ μ—°κ²°
117+
UserAuthProvider.rx.request(.signup(email: emailText, password: passwordText, nickname: nicknameText))
103118
.asObservable()
104119
.subscribe(onNext: { response in
105120
if self.signUpButton.isEnabled == true {
@@ -131,15 +146,19 @@ extension SignUpViewController {
131146
print(error)
132147
}, onCompleted: {
133148
}).disposed(by: disposeBag)
149+
} else {
150+
/// μΌμΉ˜ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€ νŒμ—… λ„μš°κΈ°
151+
self.showGrayToast(message: "λΉ„λ°€λ²ˆν˜Έκ°€ μΌμΉ˜ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.")
152+
}
134153
}
135154
func enableSignupButton() {
136-
/// ν…μŠ€νŠΈν•„λ“œ 값이 λͺ¨λ‘ μ±„μ›Œμ Έμžˆκ³ , λΉ„λ°€λ²ˆν˜Έ λ‘κ°œκ°€ μΌμΉ˜ν•  λ•Œ enable
155+
/// ν…μŠ€νŠΈν•„λ“œ 값이 λͺ¨λ‘ μ±„μ›Œμ Έμžˆμ„ λ•Œ enable
137156
let isNameEmpty = userNameTextField.text?.isEmpty
138157
let isEmailEmpty = emailTextField.text?.isEmpty
139158
let isPasswordEmpty = passwordTextField.text?.isEmpty
140159
let isCheckPasswordEmpty = checkPasswordTextField.text?.isEmpty
141160

142-
if (isNameEmpty == false) && (isEmailEmpty == false) && (isPasswordEmpty == false) && (isCheckPasswordEmpty == false) && (isSame == true) {
161+
if (isNameEmpty == false) && (isEmailEmpty == false) && (isPasswordEmpty == false) && (isCheckPasswordEmpty == false) {
143162
signUpButton.isEnabled = true
144163
self.signUpButton.backgroundColor = UIColor.pointcolor1
145164
}
@@ -443,17 +462,7 @@ extension SignUpViewController: UITextFieldDelegate {
443462
enableSignupButton()
444463
case checkPasswordTextField:
445464
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillDisappear(_:)), name: UIResponder.keyboardWillHideNotification, object: nil)
446-
guard let passwordText = passwordTextField.text,
447-
let checkPasswordText = checkPasswordTextField.text else { return }
448-
if passwordText != checkPasswordText {
449-
isSame = false
450-
self.showGrayToast(message: "λΉ„λ°€λ²ˆν˜Έκ°€ μΌμΉ˜ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.")
451-
signUpButton.isEnabled = false
452-
}
453-
else {
454-
isSame = true
455-
enableSignupButton()
456-
}
465+
enableSignupButton()
457466
default: break
458467
}
459468
}

β€ŽCA-PIN_IOS/CA-PIN_IOS/Screens/Mypage/Cells/CategoryDetail/CategoryCafeListTableViewCell.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ extension CategoryCafeListTableViewCell {
135135
}
136136
$0.addTarget(self, action: #selector(self.checkButtonClicked), for: .touchUpInside)
137137
$0.snp.makeConstraints {
138-
$0.width.equalTo(24)
139-
$0.height.equalTo(24)
138+
$0.width.equalTo(32)
139+
$0.height.equalTo(32)
140140
$0.centerY.equalTo(self.explainLabel.snp.centerY)
141141
$0.trailing.equalTo(self.contentView.snp.trailing).offset(-24)
142142
}
@@ -204,6 +204,7 @@ extension CategoryCafeListTableViewCell {
204204
}
205205
func setCheckButtonImage(bool: Bool) {
206206
switch self.checkButton.isSelected {
207+
/// TODO: - 이미지 μƒˆλ‘œ λ°›μ•„μ„œ true일 λ•Œ λ°”κΎΈκΈ°
207208
case true: self.checkButton.setImageByName("checkboxActive")
208209
case false: self.checkButton.setImageByName("checkboxInactive")
209210
}

β€ŽCA-PIN_IOS/CA-PIN_IOS/Screens/Mypage/Cells/MyPage/Category/MyCategoryCollectionViewCell.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ extension MyCategoryCollectionViewCell {
137137
if data.cafeDetail?.count == 0 {
138138

139139
}
140-
parentViewController.navigationController?.pushViewController(dvc, animated: false)
140+
parentViewController.navigationController?.pushViewController(dvc, animated: true)
141141
} catch {
142142
print(error)
143143
}
@@ -155,7 +155,7 @@ extension MyCategoryCollectionViewCell {
155155
@objc func plusButtonClicked() {
156156
let parentViewController: UIViewController = self.parentViewController!
157157
let dvc = CreateCategoryViewController()
158-
self.parentViewController?.navigationController?.pushViewController(dvc, animated: false)
158+
self.parentViewController?.navigationController?.pushViewController(dvc, animated: true)
159159
}
160160
}
161161
extension MyCategoryCollectionViewCell: UITableViewDelegate {

β€ŽCA-PIN_IOS/CA-PIN_IOS/Screens/Mypage/Cells/MyPage/Category/MyCategoryTableViewCell.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ extension MyCategoryTableViewCell {
141141
let editVC = EditCategoryViewController()
142142
editVC.placeholerCategoryName = self.placeholerCategoryName
143143
editVC.categoryId = self.categoryID
144-
self.parentViewController?.navigationController?.pushViewController(editVC , animated: false)
144+
self.parentViewController?.navigationController?.pushViewController(editVC, animated: true)
145145
})
146146
let deleteAction: UIAlertAction
147147
deleteAction = UIAlertAction(title: "μΉ΄ν…Œκ³ λ¦¬ μ‚­μ œ", style: .destructive, handler: { (action: UIAlertAction) in

β€ŽCA-PIN_IOS/CA-PIN_IOS/Screens/Mypage/ViewControllers/CategoryDetailViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ extension CategoryDetailViewController {
165165
}
166166
func layoutCancleButton() {
167167
self.view.add(self.cancleButton) {
168-
$0.setupButton(title: "μ·¨μ†Œν•˜κΈ°", color: .white, font: .notoSansKRMediumFont(fontSize: 15), backgroundColor: .gray3, state: .normal, radius: 24.5)
168+
$0.setupButton(title: "μ·¨μ†Œ", color: .gray4, font: .notoSansKRMediumFont(fontSize: 15), backgroundColor: .gray2, state: .normal, radius: 24.5)
169169
$0.addTarget(self, action: #selector(self.cancleButtonClicked), for: .touchUpInside)
170170
$0.snp.makeConstraints {
171171
$0.leading.equalToSuperview().offset(110)

β€ŽCA-PIN_IOS/CA-PIN_IOS/Screens/Mypage/ViewControllers/EditProfileViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ extension EditProfileViewController {
197197
func layoutCompleteButton() {
198198
view.add(completeButton) {
199199
$0.setupButton(title: "μ™„λ£Œ", color: .white,
200-
font: .notoSansKRMediumFont(fontSize: 16), backgroundColor: .pointcolor1,
200+
font: .notoSansKRMediumFont(fontSize: 16), backgroundColor: .maincolor1,
201201
state: .normal, radius: 24.5)
202202
$0.addTarget(self, action: #selector(self.completeButtonClicked), for: .touchUpInside)
203203
$0.snp.makeConstraints {

β€ŽCA-PIN_IOS/CA-PIN_IOS/Screens/Mypage/ViewControllers/MypageViewController.swift

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ class MypageViewController: UIViewController {
9191

9292
override func viewWillAppear(_ animated: Bool) {
9393
print(#function)
94+
loadInfoData()
95+
print(self.cafeTI)
96+
print(self.profileImage)
97+
bindMyData()
9498
getCategoryListService()
9599
getReviewListService()
96100
}
@@ -376,9 +380,9 @@ extension MypageViewController {
376380
}
377381
}
378382
@objc func backButtonClicked() {
379-
let mapVC = (self.navigationController?.children[2] as? MapViewController)!
380-
self.navigationController?.popToViewController(mapVC, animated: true)
381-
// self.navigationController?.popViewController(animated: true)
383+
// let mapVC = (self.navigationController?.children[2] as? MapViewController)!
384+
// self.navigationController?.popToViewController(mapVC, animated: true)
385+
self.navigationController?.popViewController(animated: true)
382386
}
383387
@objc func cafeTITestButtonClicked() {
384388
let cafetiVC = CafeTIViewController()

0 commit comments

Comments
Β (0)