-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Week 1 assignment #6
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ ์ ๋น์ฒ์ฌ
titleLabel.snp.makeConstraints { | ||
$0.top.equalTo(view.safeAreaLayoutGuide.snp.top).offset(270) | ||
$0.leading.equalTo(view.safeAreaLayoutGuide.snp.leading).offset(20) | ||
$0.trailing.equalTo(view.safeAreaLayoutGuide.snp.trailing).offset(-20) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์๊ฑฐ offset๋ง๊ณ inset์ผ๋ก ์ฃผ๋ฉด inset(20)ํ๋ฉด ๋๋ค~? ์ฐธ๊ณ ํ!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hwangJi-dev ์!!!!!! ํฉ์ง์์ ์ฒ์ฐ๊ฐ?? ์ค์ผ๋ฐ๋ฆฌ!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hwangJi-dev ๋ด ํผ์๋ ๋๋ฌ์์ค ์ ๋ฐฐ~~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๋๋์ ๋ฐฐ ์์๊ฐ ์ฅ๋ฆฌ๋ ์ด์ ๊ฐ ์ฌ๊ธฐ ์์๋ค์ ;;
์์ฃผ์ ๋ฐฐ๊ฐ ๋งํฌ ๊ตฌ๋ฌธ ์ถ์ฒํด์คฌ๋๋ฐ ์ฌ๊ธฐ์ ๋ณด๋ค์ฌ.. ์ ๋ ์ผ๋ฅธ ์ ์ฉํด๋ณด๊ฒ ์ต๋๋ค ~ ๐
์ฌ๊ธฐ๋ ๋ด์ผ ๋ค์ ์ฐพ์์ฌ๊ฒ์
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ ๋น๊ฑธ...๋๋ ๊ทธ๋ฅ ์ฒ์ฌ์ผ...
์ด๋ฐ์์ผ๋กํ๋ฉด ์ด? ๊ทธ๋ฅ ์ฑ์คํ ์ด ์ ๋ณต๋ฐ์ ๋ชปํ๋ค๋๊น??
์ฝ๋ฒ ๋ก ๊น๋ํ๊ฒ ๋ ์ด์์๋ ์์ก์์คฌ๋น ๊ตฟ๊ตฟ๐๐ป
๋ด์ฃผ์ inset ํ์ฉํด์ ๋ ์ด์์ ์ผ๋ฌด์ง๊ฒ ์ก์๋ณด์๐๐ฅฐ
์๊ณ ํ์ด๐ฅ๐ฅ
import UIKit | ||
|
||
extension UITextField { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๊ทธ๋ฅ ํ์ผ์์ฒด๊ฐ ์ ๋ ๋๊ฐ๋ค์^__^
๊ทธ๋ฅ ์ง์ํค๋๋ค์ด๋ค์^^
$0.contentMode = .scaleAspectFit | ||
} | ||
private let userNameTextField = DefaultTextField().then { | ||
$0.placeholder = "์ ํ๋ฒํธ, ์ฌ์ฉ์ ์ด๋ฆ ๋๋ ์ด๋ฉ์ผ" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๋ํดํธ ์คํ์ผ ์ ์ฉํ Custom Class ๋ง๋ค์ด์ ์ฐ๋๊ฑฐ ์ข๋ค์๐๐ป๐๐ป
private func setTapSignUpBtn() { | ||
signUpBtn.press { | ||
let signUpUserNameVC = SignUpVC() | ||
signUpUserNameVC.signUpViewType = .makeUserName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enum
ํ์ฉ ์งฑ์ด๋ค ๋....
์ญ์ nadoAlert
์ ์ฐฝ์์..
welcomeVC.userName = self.userName | ||
self.present(welcomeVC, animated: true) | ||
self.navigationController?.popToRootViewController(animated: true) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ ์ด๊ฑฐ ์ง์ง ๋ฏธ์น๊ฑฐ ์๋๊น?? ์ด์ด???
์ด๋ ๊ฒ ์ผ๋ฌผ๋ฑ+ํจ์จ์ ์ผ๋ก ์ผ์ด์ค ๋๋ ์ ํ๋ฉด์ ํ์ ํด์ค๋ค๊ณ ??
์ง์ง ๋๋ฐ์ธ๋ฐ??์ด??? ๋๋ฐ๋๋ฐ..
ํนํ ์ฝ๋๋ฒ ์ด์ค ๊ธฐ๋ฐ์์ ๋๊ฐ์ ๊ตฌ์กฐ์ ๋ทฐ ๋๊ฐ ์๋ ์ํฉ์ด๋๊น ์ง์ง ํจ์จ์ ์ธ ํ๋ฉด์ ํ ๋ฐฉ์์ธ๊ฑฐ ๊ฐ์ !!๐ฅ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ ์ธ์ ์ ๋น.. ์ฒ์ฐ๊ฐ... ๋๋ ์ฝ์ฅ ํด๋ ๋ ๊น ํน์ ~~~~~ ์ฉ๋ค ์ฉ๋ค
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Suyeon9911 ์ฝ์ฅํด์ฉ๐๐ซ
titleLabel.text = "๋น๋ฐ๋ฒํธ ๋ง๋ค๊ธฐ" | ||
contentLabel.text = "๋น๋ฐ๋ฒํธ๋ฅผ ์ ์ฅํ ์ ์์ผ๋ฏ๋ก iCloud ๊ธฐ๊ธฐ์์ ๋ก๊ทธ์ธ ์ ๋ณด๋ฅผ ์ ๋ ฅํ์ง ์์๋ ๋ฉ๋๋ค." | ||
textField.placeholder = "๋น๋ฐ๋ฒํธ" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ฒ์ฌ๋ค ์ ์ ๋น..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๋๋์ ๋ฐฐ ์ต๊ณ ~~!!!
์ ๋น์ ๋ฐฐ ์ต๊ณ ~~!!!!๐
|
||
import UIKit | ||
|
||
class BaseVC: UIViewController { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BaseVC ์์๋ฐ์์ ์ฐ๋ ๋ฐฉ์ ์ข๋ค์~~!!
import Then | ||
import SnapKit | ||
|
||
class SignInVC: BaseVC { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ด ์น๊ตฌ์ ์๋ธํด๋์ค๊ฐ ํ์ํ์ง ์์ผ๋ฉด ์์ final ํค์๋๋ฅผ ๋ถ์ด๋๊ฑด ์ด๋จ๊น์?
์ปดํ์ผ๋ฌ๊ฐ ์ด ํค์๋๋ฅผ ๋ณด๊ณ static dispatch๋ฅผ ํ๋ค๋ฉด ์ฑ๋ฅ์ด ํฅ์ ๋ ๊ฒ ๊ฐ์ต๋๋ค~!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@noah0316 ์ค ์ข์ ์ ์ ๊ฐ์ฌ์!!!!!! ๋์ ๊ณผ์ ์ ์ ๋ฐ์ํ๊ฒ ์ด!!!!!!!
} | ||
|
||
// MARK: - UI | ||
extension SignInVC { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UI ๊ด๋ จ๋ ๋ถ๋ถ์ extension์ผ๋ก ๋ฐ๋ก ๋นผ์ฃผ์๋ ๋ถ๋ฆฌ๊ฐ ์๋์ด์์ด ๋ณด๊ธฐ ํธํ๋ค์.. ์งฑ์งฑ~!!๐๐
$0.top.equalTo(view.safeAreaLayoutGuide.snp.top).offset(80) | ||
$0.leading.equalTo(view.safeAreaLayoutGuide.snp.leading).offset(40) | ||
$0.trailing.equalTo(view.safeAreaLayoutGuide.snp.trailing).offset(-40) | ||
$0.height.equalTo(80) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์์ ํต์ผ์ฑ ์๋๊ฑฐ ํธ์ํ๋ค์...
var isEmpty: Bool { | ||
if text?.isEmpty ?? true { | ||
return true | ||
} | ||
return false | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UITextField์ hasText๋ฅผ ์ฌ์ฉํ๋ฉด ์ด ์น๊ตฌ๋ ์์จ๋ ๋์ง ์๋์?! ๊ถ๊ธํฉ๋๋ค~!!๐ง
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dev-madilyn ์ค ๊ทธ๋ฐ ๋ฉ์๋๊ฐ ์๋ ์ค ๋ชฐ๋์!!~~~~!!! ๋กํ!
} | ||
|
||
private func setTapSignInBtn() { | ||
signInBtn.press { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
press method๊ฐ escaping closure๋ก ๋๊ณ , ํด๋ก์ ธ๋ฅผ ํ๋กํผํฐ์ ์ ์ฅํ๊ณ ์์ด์
press
๋ฉ์๋๋ฅผ ์ฌ์ฉํ ๋ [weak self]
๋ฅผ ๋ฃ์ด์ฃผ์ง ์์ผ๋ฉด ์ด๊ณณ์์ ๋ฉ๋ชจ๋ฆฌ ๋์๊ฐ ๋ฐ์ํ ๊ฒ ๊ฐ๋ค์~!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@noah0316 ํน์ ์ธ๊ฐ ์์ ํ ์ด์ ์ง.. ์ฌ๊ธฐ์ ๊ธฐ ์ํฌ์ ํ ์ด๋๊ฐ์ฐ ๋ค๋์๋ค์ ใ ใ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@noah0316 ์ค ํ์ธ์ฌ ใ ใ ใ ์ธ๊ฐ ๋ฉ๋ชจ๋ฆฌ์ธ์ด๋ฒ ์ด์๋ค์...
๐ฑ ์์ ํ ๋ด์ฉ
๊ธฐ๋ณธ ๊ณผ์
ํ์ํ
Extension
์ถ๊ฐ์ฌ์ฌ์ฉ ์ปดํฌ๋ํธ ์ถ๊ฐ
DefaultTextField
BlueBtnWithTextField
BaseVC
,BaseNC
์ถ๊ฐ๋ก๊ทธ์ธ, ํ์๊ฐ์ (๋ ๊ฐ์ ๋ทฐ ์ฌ์ฌ์ฉ), ์๋ฃ ํ๋ฉด ๊ตฌ์ฑ
๐ฑ PR Point
๐ธ ์คํฌ๋ฆฐ์ท
๐ฎ ๊ด๋ จ ์ด์