-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Feature/#105
- Loading branch information
Showing
21 changed files
with
177 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// | ||
// MapResponse.swift | ||
// CA-PIN_IOS | ||
// | ||
// Created by 노한솔 on 2021/07/21. | ||
// | ||
|
||
import Foundation | ||
|
||
struct MapListResponseArrayType<T: Codable>: Codable { | ||
var status: Int? | ||
var success: Bool? | ||
var message: String? | ||
var cafeLocations: [T]? | ||
} | ||
|
||
struct CafeDetailResponseType<T: Codable>: Codable { | ||
var status: Int? | ||
var success: Bool? | ||
var message: String? | ||
var cafeDetail: T? | ||
} | ||
|
||
struct MyMapListResponseType<T: Codable>: Codable { | ||
var message: String? | ||
var myMapLocations: [T]? | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,9 +72,15 @@ extension LoginViewController { | |
layoutSignupButton() | ||
} | ||
func keyboardObserver(){ | ||
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShow(_:)), name: UIResponder.keyboardWillShowNotification, object: nil) | ||
NotificationCenter.default.addObserver(self, | ||
selector: #selector(keyboardWillShow(_:)), | ||
name: UIResponder.keyboardWillShowNotification, | ||
object: nil) | ||
|
||
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillDisappear(_:)), name: UIResponder.keyboardWillHideNotification, object: nil) | ||
NotificationCenter.default.addObserver(self, | ||
selector: #selector(keyboardWillDisappear(_:)), | ||
name: UIResponder.keyboardWillHideNotification, | ||
object: nil) | ||
} | ||
|
||
/// 로그인 서버 연결 | ||
|
@@ -95,19 +101,20 @@ extension LoginViewController { | |
KeychainWrapper.standard.set(passwordText, forKey: "loginPassword") | ||
KeychainWrapper.standard.set(data.loginData!.token, forKey: "accessToken") | ||
|
||
let cafeTI = KeychainWrapper.standard.string(forKey: "userCafeTI") | ||
// let cafeTI = UserDefaults.standard.string(forKey: "userCafeTI") | ||
// if (cafeTI != nil) == true { | ||
// let mapVC = MapViewController() | ||
// self.navigationController?.pushViewController(mapVC, animated: false) | ||
// } | ||
// else { | ||
// let myPageVC = CafeTIViewController() | ||
// self.navigationController?.pushViewController(myPageVC, animated: false) | ||
// } | ||
if cafeTI != nil { | ||
let mapVC = MapViewController() | ||
self.navigationController?.pushViewController(mapVC, animated: false) | ||
} | ||
else { | ||
let cafeTIVC = CafeTIViewController() | ||
self.navigationController?.pushViewController(cafeTIVC, animated: false) | ||
} | ||
|
||
// 지수코드 | ||
let myPageVC = CafeTIViewController() | ||
self.navigationController?.pushViewController(myPageVC, animated: false) | ||
// let myPageVC = CafeTIViewController() | ||
// self.navigationController?.pushViewController(myPageVC, animated: false) | ||
|
||
} catch { | ||
print(error) | ||
|
@@ -165,7 +172,9 @@ extension LoginViewController { | |
} | ||
func layoutEmailLabel() { | ||
self.view.add(self.emailLabel) { | ||
$0.setupLabel(text: "이메일 아이디", color: .maincolor1, font: UIFont.notoSansKRMediumFont(fontSize: 16)) | ||
$0.setupLabel(text: "이메일 아이디", | ||
color: .maincolor1, | ||
font: UIFont.notoSansKRMediumFont(fontSize: 16)) | ||
$0.letterSpacing = -0.8 | ||
$0.snp.makeConstraints { | ||
$0.top.equalTo(self.logoImageView.snp.bottom).offset(84) | ||
|
@@ -175,7 +184,9 @@ extension LoginViewController { | |
} | ||
func layoutEmailTextField() { | ||
self.view.add(self.emailTextField) { | ||
$0.attributedPlaceholder = NSAttributedString(string: "[email protected]", attributes: [NSAttributedString.Key.foregroundColor: UIColor.gray3]) | ||
$0.attributedPlaceholder = NSAttributedString( | ||
string: "[email protected]", | ||
attributes: [NSAttributedString.Key.foregroundColor: UIColor.gray3]) | ||
$0.textColor = .black | ||
$0.font = UIFont.notoSansKRRegularFont(fontSize: 16) | ||
$0.snp.makeConstraints { | ||
|
@@ -209,7 +220,9 @@ extension LoginViewController { | |
} | ||
func layoutPasswordTextField() { | ||
self.view.add(self.passwordTextField) { | ||
$0.attributedPlaceholder = NSAttributedString(string: "yourpassword", attributes: [NSAttributedString.Key.foregroundColor: UIColor.gray3]) | ||
$0.attributedPlaceholder = NSAttributedString( | ||
string: "yourpassword", | ||
attributes: [NSAttributedString.Key.foregroundColor: UIColor.gray3]) | ||
$0.font = UIFont.notoSansKRRegularFont(fontSize: 16) | ||
$0.isSecureTextEntry = true | ||
$0.snp.makeConstraints { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.