Skip to content

Commit

Permalink
Merge pull request #167 from Sopt-Mongle/feature/#164
Browse files Browse the repository at this point in the history
ํšŒ์›๊ฐ€์ž… ์ˆ˜์ • ์™„๋ฃŒ
  • Loading branch information
qodhrkawk authored Nov 20, 2020
2 parents 88b9c37 + 3f3fb50 commit 25b34f7
Show file tree
Hide file tree
Showing 15 changed files with 167 additions and 26 deletions.
7 changes: 5 additions & 2 deletions Mongle/Mongle.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1313,7 +1313,8 @@
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = io.github.juhyeoklee.Mongle;
MARKETING_VERSION = 1.01;
PRODUCT_BUNDLE_IDENTIFIER = io.github.juhyeoklee.Mongle12;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
Expand All @@ -1332,7 +1333,9 @@
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = io.github.juhyeoklee.Mongle;

MARKETING_VERSION = 1.01;
PRODUCT_BUNDLE_IDENTIFIER = io.github.juhyeoklee.Mongle12;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
Expand Down
2 changes: 1 addition & 1 deletion Mongle/Mongle/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"scale" : "1x",
"filename" : "joinStep2BtnBack.png",
"idiom" : "universal"
},
{
"scale" : "2x",
"idiom" : "universal",
"filename" : "[email protected]"
},
{
"filename" : "[email protected]",
"scale" : "3x",
"idiom" : "universal"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "joinStep2NicknameIcPossible.png"
},
{
"filename" : "[email protected]",
"scale" : "2x",
"idiom" : "universal"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions Mongle/Mongle/Resource/Storyboard/SignUp.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="์ž…๋ ฅํ•œ ์ด๋ฉ”์ผ๋กœ ๋ณธ์ธ ํ™•์ธ ๋ฉ”์ผ์ด ์ „์†ก๋ฉ๋‹ˆ๋‹ค." textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1wu-Tg-nve">
<rect key="frame" x="129.33333333333337" y="34" width="217.66666666666663" height="14.333333333333336"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<rect key="frame" x="111.33333333333333" y="34" width="235.66666666666669" height="15.666666666666664"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
Expand Down
7 changes: 3 additions & 4 deletions Mongle/Mongle/Resource/Storyboard/SignUpAgree.storyboard
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17506" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina5_9" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17126"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17505"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
Expand Down Expand Up @@ -171,6 +171,7 @@
<constraints>
<constraint firstItem="wcK-s5-79n" firstAttribute="trailing" secondItem="J33-0p-aKj" secondAttribute="trailing" constant="30" id="2rW-Zu-8Mz"/>
<constraint firstItem="izQ-xH-jK1" firstAttribute="top" secondItem="Fgs-FZ-wgx" secondAttribute="bottom" id="5hy-Md-vXp"/>
<constraint firstItem="cgy-am-fmz" firstAttribute="top" secondItem="tIM-pv-Lon" secondAttribute="top" constant="12" id="BKU-qJ-3XX"/>
<constraint firstItem="Kcz-dq-i0G" firstAttribute="leading" secondItem="wcK-s5-79n" secondAttribute="leading" constant="17" id="BlB-5d-xBs"/>
<constraint firstItem="SmI-qL-dQF" firstAttribute="top" secondItem="bZx-5c-Dxr" secondAttribute="bottom" constant="15.4" id="DHy-i5-uQM"/>
<constraint firstItem="wcK-s5-79n" firstAttribute="trailing" secondItem="izQ-xH-jK1" secondAttribute="trailing" constant="19" id="DL3-lH-moh"/>
Expand All @@ -194,7 +195,6 @@
<constraint firstAttribute="bottom" secondItem="Mb1-zg-2LT" secondAttribute="bottom" constant="50" id="dML-AT-x3m"/>
<constraint firstItem="L9B-bV-bXr" firstAttribute="top" secondItem="ppY-fj-FLw" secondAttribute="bottom" constant="73" id="dVS-0l-PwP"/>
<constraint firstItem="tIM-pv-Lon" firstAttribute="top" secondItem="wvJ-X5-Az0" secondAttribute="bottom" constant="9" id="f7y-Y5-DEc"/>
<constraint firstItem="cgy-am-fmz" firstAttribute="top" secondItem="wvJ-X5-Az0" secondAttribute="bottom" constant="21" id="fTm-M6-iDZ"/>
<constraint firstItem="VXo-fU-Wev" firstAttribute="leading" secondItem="wcK-s5-79n" secondAttribute="leading" constant="31" id="gQA-2H-Eit"/>
<constraint firstItem="SmI-qL-dQF" firstAttribute="leading" secondItem="wcK-s5-79n" secondAttribute="leading" constant="28" id="jHb-My-sIn"/>
<constraint firstItem="97s-AS-qFu" firstAttribute="leading" secondItem="t5R-5U-G2W" secondAttribute="trailing" id="jWt-Ok-UkB"/>
Expand Down Expand Up @@ -222,7 +222,6 @@
<outlet property="closeButton" destination="Kcz-dq-i0G" id="O3m-XP-cwd"/>
<outlet property="explainTextView" destination="J33-0p-aKj" id="JTH-0o-qp0"/>
<outlet property="headerImageView" destination="SmI-qL-dQF" id="hPs-Sk-z4p"/>
<outlet property="innerCircle2Constraint" destination="fTm-M6-iDZ" id="a9P-7R-vRN"/>
<outlet property="mongleImageView" destination="bZx-5c-Dxr" id="3lk-TK-oFI"/>
<outlet property="nextButton" destination="Mb1-zg-2LT" id="tZK-oa-857"/>
<outlet property="noticeLabel" destination="Bzk-dP-UYm" id="KEY-Kx-e3b"/>
Expand Down
6 changes: 2 additions & 4 deletions Mongle/Mongle/Source/VCs/SignUpAgreeVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ class SignUpAgreeVC: UIViewController {
@IBOutlet weak var showServiceAgreeButton: UIButton!

@IBOutlet weak var outerCircle2Constraint: NSLayoutConstraint!
@IBOutlet weak var innerCircle2Constraint: NSLayoutConstraint!



Expand Down Expand Up @@ -265,7 +264,6 @@ class SignUpAgreeVC: UIViewController {
textViewTopConstraint.constant = 76

outerCircle2Constraint.constant = 28
innerCircle2Constraint.constant = 39
serViceButtonConstraint.constant = 18
checkButton2Constraints.constant = 18
smallNext2Constraint.constant = 33
Expand All @@ -276,7 +274,8 @@ class SignUpAgreeVC: UIViewController {

warnView.snp.makeConstraints{
$0.leading.equalToSuperview().offset(58)
$0.top.equalToSuperview().offset(349)
$0.top.equalTo(self.noticeLabel).offset(26)
// $0.top.equalToSuperview().offset(349)
$0.height.equalTo(15)
$0.width.equalTo(200)
}
Expand Down Expand Up @@ -333,7 +332,6 @@ class SignUpAgreeVC: UIViewController {
warnView.removeFromSuperview()
textViewTopConstraint.constant = 53
outerCircle2Constraint.constant = 10
innerCircle2Constraint.constant = 21
serViceButtonConstraint.constant = 0
checkButton2Constraints.constant = 0
smallNext2Constraint.constant = 15
Expand Down
2 changes: 1 addition & 1 deletion Mongle/Mongle/Source/VCs/SignUpEmailVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ class SignUpEmailVC: UIViewController, UITextFieldDelegate{

// Buttons
resendButton2.snp.makeConstraints{
$0.top.equalTo(subMessageLabel.snp.bottom).offset(26)
$0.top.equalToSuperview().offset(171)
$0.leading.equalToSuperview().offset(89)
$0.trailing.equalToSuperview().offset(-88)
$0.height.equalTo(37)
Expand Down
119 changes: 107 additions & 12 deletions Mongle/Mongle/Source/VCs/SignUpVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class SignUpVC: UIViewController, UITextFieldDelegate {

//MARK:- User Define Functions
func setItems(){
backButton.setImage(UIImage(named: "joinEmailErrorBtnClose")?.withRenderingMode(.alwaysOriginal), for: .normal)
backButton.setImage(UIImage(named: "joinStep2BtnBack")?.withRenderingMode(.alwaysOriginal), for: .normal)
upperBlurHeight.constant = 91*deviceBound

emailTextField.placeholder = "์ด๋ฉ”์ผ ์ฃผ์†Œ"
Expand All @@ -198,7 +198,7 @@ class SignUpVC: UIViewController, UITextFieldDelegate {

nickNameWarningLabel.textColor = .reddish
nickNameWarningImageView.image = UIImage(named: "joinEmailErrorIcWarning")
registerButton.setTitle("๊ฐ€์ž…ํ•˜๊ธฐ", for: .normal)
registerButton.setTitle("๋‹ค์Œ", for: .normal)
registerButton.setTitleColor(.white, for: .normal)
registerButton.backgroundColor = .softGreen
registerButton.makeRounded(cornerRadius: 30)
Expand Down Expand Up @@ -281,7 +281,7 @@ class SignUpVC: UIViewController, UITextFieldDelegate {
if textField == passWordTextField || textField == passWordTextField2 {
// let move = CGPoint(x: 0, y: (105+emailIsWarning)*Int(deviceBound))
let move = CGPoint(x: 0, y: (105+emailIsWarning))
UIView.animate(withDuration: 0.5, animations: {
UIView.animate(withDuration: 0.5, delay : 0.3, animations: {

self.signUpScrollView.setContentOffset(move, animated: false)
})
Expand Down Expand Up @@ -328,19 +328,83 @@ class SignUpVC: UIViewController, UITextFieldDelegate {
nickNameQuantityLabel.alpha = 0
}
else if textField == emailTextField{
if emailTextField.text == "" || emailTextField.text?.isValidEmailAddress() == false{

if emailTextField.text == ""{
emailWarningLabel.text = "์ด๋ฉ”์ผ ์ฃผ์†Œ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”!"
showEmailWarning()
hidePasswordWarning()

if passwordIsWarning == 25 {
hidePasswordWarning()
showPasswordWarning()
}
}
else if emailTextField.text?.isValidEmailAddress() == false{
emailWarningLabel.text = "์˜ฌ๋ฐ”๋ฅธ ์ด๋ฉ”์ผ ํ˜•์‹์ด ์•„๋‹ˆ์—์š”!"
showEmailWarning()

// if passwordIsWarning == 25 {
hidePasswordWarning()
// showPasswordWarning()


// }

if passwordIsWarning == 25 {
hidePasswordWarning()
showPasswordWarning()
}


}
else{
let email = emailTextField.text!
let name = "1a2a3a4a5a6a7a8a"

SignUpDuplicateService.shared.checkDuplicate(email: email, name: name) { networkResult in
switch networkResult {
case .success(let data):
let dup = data as? String
print(dup!)
if dup == "available" {
self.emailWarningLabel.text = "์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ์ด๋ฉ”์ผ์ด์—์š”!"
self.showEmailValid()

}

else if dup == "email"{
self.emailWarningLabel.text = "์ด๋ฏธ ๊ฐ€์ž…๋œ ์ด๋ฉ”์ผ์ด์—์š”!"
self.showEmailWarning()

}

case .requestErr(let duplicate) :
let dup = duplicate as? String
print(dup!)
if dup == "available" {
self.emailWarningLabel.text = "์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ์ด๋ฉ”์ผ์ด์—์š”!"
self.showEmailValid()
}

else if dup == "email"{
self.emailWarningLabel.text = "์ด๋ฏธ ๊ฐ€์ž…๋œ ์ด๋ฉ”์ผ์ด์—์š”!"
self.showEmailWarning()

}

case .pathErr: print("ptherr")
case .serverErr: print("serverErr")
case .networkFail: print("networkFails2")



}



}


}

}


Expand Down Expand Up @@ -587,7 +651,7 @@ class SignUpVC: UIViewController, UITextFieldDelegate {
else{

if passWordTextField.text == passWordTextField2.text && passWordTextField.text != "" && passWordTextField2.text != ""{

self.passwordWarningLabel.text = "๋น„๋ฐ€๋ฒˆํ˜ธ๊ฐ€ ์ผ์น˜ํ•ด์š”!"
self.passwordWarningImageView.image = UIImage(named: "joinPassword5IcPossible")
self.passwordWarningLabel.textColor = .softGreen
Expand Down Expand Up @@ -623,12 +687,14 @@ class SignUpVC: UIViewController, UITextFieldDelegate {
self.signUpScrollView.addSubview(emailWarningImageView)
self.signUpScrollView.addSubview(emailWarningLabel)

emailWarningLabel.textColor = .reddish

emailWarningImageView.snp.makeConstraints {
$0.top.equalToSuperview().offset(119)
$0.leading.equalToSuperview().offset(28)
$0.width.height.equalTo(15)
}

emailWarningImageView.image = UIImage(named: "joinEmailErrorIcWarning")
emailWarningLabel.snp.makeConstraints {
$0.top.equalToSuperview().offset(119)
$0.leading.equalToSuperview().offset(51)
Expand All @@ -638,6 +704,32 @@ class SignUpVC: UIViewController, UITextFieldDelegate {

emailIsWarning = 25

}

func showEmailValid(){
emailToPassWordConstraint.constant = 59
self.signUpScrollView.addSubview(emailWarningImageView)
self.signUpScrollView.addSubview(emailWarningLabel)
emailWarningImageView.image = UIImage(named: "joinStep2NicknameIcPossible")
emailWarningLabel.textColor = .softGreen

emailWarningImageView.snp.makeConstraints {
$0.top.equalToSuperview().offset(119)
$0.leading.equalToSuperview().offset(28)
$0.width.height.equalTo(15)
}

emailWarningLabel.snp.makeConstraints {
$0.top.equalToSuperview().offset(119)
$0.leading.equalToSuperview().offset(51)

}
// self.emailTextField.setBorder(borderColor: .reddish, borderWidth: 1.0)

emailIsWarning = 25



}

func hideEmailWarning(){
Expand All @@ -654,8 +746,8 @@ class SignUpVC: UIViewController, UITextFieldDelegate {
passwordIsWarning = 25
print(1)
passWordToNIckNameConstraint.constant = 59


passwordWarningLabel.textColor = .reddish
self.passwordWarningImageView.image = UIImage(named: "joinEmailErrorIcWarning")
self.signUpScrollView.addSubview(passwordWarningImageView)
self.signUpScrollView.addSubview(passwordWarningLabel)

Expand Down Expand Up @@ -814,6 +906,8 @@ class SignUpVC: UIViewController, UITextFieldDelegate {


@IBAction func registerButtonAction(_ sender: Any) {


self.view.endEditing(true)
if emailTextField.text == ""{
emailWarningLabel.text = "์ด๋ฉ”์ผ ์ฃผ์†Œ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”!"
Expand All @@ -834,12 +928,13 @@ class SignUpVC: UIViewController, UITextFieldDelegate {

}
else if passWordTextField.text == "" || passWordTextField2.text == ""{
passwordWarningLabel.text = "์˜๋ฌธ+์ˆซ์ž ์ตœ์†Œ 8์ž๋ฆฌ ์ด์ƒ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”!"
passwordWarningLabel.text = "๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”!"
showPasswordWarning()

}
else if !passWordTextField.text!.isValidPassword() {
passwordWarningLabel.text = "๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”!"
passwordWarningLabel.text = "์˜๋ฌธ+์ˆซ์ž ์ตœ์†Œ 8์ž๋ฆฌ ์ด์ƒ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”!"

showPasswordWarning()

}
Expand Down

0 comments on commit 25b34f7

Please sign in to comment.