Skip to content
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

Merged
merged 25 commits into from
Apr 13, 2022
Merged

Week 1 assignment #6

merged 25 commits into from
Apr 13, 2022

Conversation

dev-jungbin
Copy link
Member

@dev-jungbin dev-jungbin commented Apr 10, 2022

๐ŸŒฑ ์ž‘์—…ํ•œ ๋‚ด์šฉ

๊ธฐ๋ณธ ๊ณผ์ œ

  • ์ฝ”๋“œ๋ฒ ์ด์Šค ํ”„๋กœ์ ํŠธ ์„ธํŒ…
  • UI ๊ตฌ์„ฑ
    • ํ•„์š”ํ•œ Extension ์ถ”๊ฐ€

    • ์žฌ์‚ฌ์šฉ ์ปดํฌ๋„ŒํŠธ ์ถ”๊ฐ€

      • DefaultTextField
        แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2022-04-10 แ„‹แ…ฉแ„’แ…ฎ 12 28 38

      • BlueBtnWithTextField
        แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2022-04-10 แ„‹แ…ฉแ„’แ…ฎ 12 28 52

    • BaseVC, BaseNC ์ถ”๊ฐ€

    • ๋กœ๊ทธ์ธ, ํšŒ์›๊ฐ€์ž…(๋‘ ๊ฐœ์˜ ๋ทฐ ์žฌ์‚ฌ์šฉ), ์™„๋ฃŒ ํ™”๋ฉด ๊ตฌ์„ฑ

  • ํ™”๋ฉด ์ „ํ™˜
  • ๋ฐ์ดํ„ฐ ์ „๋‹ฌ

๐ŸŒฑ PR Point

  • ๋‘ ๋ฒˆ ์ด์ƒ ์“ฐ์ด๋Š” ๋ถ€๋ถ„(TextField, Blue Button, ํšŒ์›๊ฐ€์ž… 1, 2 ํ™”๋ฉด)์„ ์žฌ์‚ฌ์šฉํ•˜๋Š” ์‹์œผ๋กœ ๊ตฌ์„ฑ
  • โ“ ๊ทผ๋ฐ... ์ฝ”๋“œ๋กœ Button ์˜ฌ๋ฆฌ๋‹ˆ๊นŒ ํ„ฐ์น˜ํ–ˆ์„ ๋•Œ ๋ฒ„ํŠผ์ด ๋ˆŒ๋ฆฌ๋Š” ๋“ฏํ•œ ํšจ๊ณผ(?)๊ฐ€ ์•ˆ ๋‚˜์™€์—ฌ... ์ด๊ฑฐ ์–ด์ผ€ ํ•˜ใ…ˆใ…•...

๐Ÿ“ธ ์Šคํฌ๋ฆฐ์ƒท

๊ตฌํ˜„ ๋‚ด์šฉ ์Šคํฌ๋ฆฐ์ƒท
๊ธฐ๋ณธ ๊ณผ์ œ Simulator Screen Recording - iPhone 13 mini - 2022-04-10 at 12 32 22

๐Ÿ“ฎ ๊ด€๋ จ ์ด์Šˆ

@dev-jungbin dev-jungbin added the ๐Ÿ“ฑ assignment - basic ๊ธฐ๋ณธ ๊ณผ์ œ label Apr 10, 2022
@dev-jungbin dev-jungbin self-assigned this Apr 10, 2022
Copy link

@hwangJi-dev hwangJi-dev left a 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)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์š”๊ฑฐ offset๋ง๊ณ  inset์œผ๋กœ ์ฃผ๋ฉด inset(20)ํ•˜๋ฉด ๋œ๋‹ค~? ์ฐธ๊ณ ํ–‰!!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hwangJi-dev ์•„!!!!!! ํ™ฉ์ง€์€์€ ์ฒœ์žฐ๊ฐ€?? ์˜ค์ผ€๋ฐ”๋ฆฌ!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hwangJi-dev ๋‚ด ํ”ผ์•Œ๋„ ๋†€๋Ÿฌ์™€์ค˜ ์„ ๋ฐฐ~~

Copy link
Member

@wngus4296 wngus4296 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋‚˜๋„์„ ๋ฐฐ ์•„์š”๊ฐ€ ์ฅ๋ฆฌ๋Š” ์ด์œ ๊ฐ€ ์—ฌ๊ธฐ ์žˆ์—ˆ๋„ค์š” ;;
์€์ฃผ์„ ๋ฐฐ๊ฐ€ ๋งˆํฌ ๊ตฌ๋ฌธ ์ถ”์ฒœํ•ด์คฌ๋Š”๋ฐ ์—ฌ๊ธฐ์„œ ๋ณด๋„ค์—ฌ.. ์ €๋„ ์–ผ๋ฅธ ์ ์šฉํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค ~ ๐Ÿ˜Ž

์—ฌ๊ธฐ๋„ ๋‚ด์ผ ๋‹ค์‹œ ์ฐพ์•„์˜ฌ๊ฒŒ์š”

Copy link
Member

@jane1choi jane1choi left a 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 {

Copy link
Member

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 = "์ „ํ™”๋ฒˆํ˜ธ, ์‚ฌ์šฉ์ž ์ด๋ฆ„ ๋˜๋Š” ์ด๋ฉ”์ผ"
Copy link
Member

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
Copy link
Member

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)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์™€ ์ด๊ฑฐ ์ง„์งœ ๋ฏธ์นœ๊ฑฐ ์•„๋‹๊นŒ?? ์–ด์–ด???
์ด๋ ‡๊ฒŒ ์•ผ๋ฌผ๋”ฑ+ํšจ์œจ์ ์œผ๋กœ ์ผ€์ด์Šค ๋‚˜๋ˆ ์„œ ํ™”๋ฉด์ „ํ™˜์„ ํ•ด์ค€๋‹ค๊ณ ??
์ง„์งœ ๋Œ€๋ฐ•์ธ๋ฐ??์–ด??? ๋Œ€๋ฐ•๋Œ€๋ฐ•..
ํŠนํžˆ ์ฝ”๋“œ๋ฒ ์ด์Šค ๊ธฐ๋ฐ˜์—์„œ ๋˜‘๊ฐ™์€ ๊ตฌ์กฐ์˜ ๋ทฐ ๋‘๊ฐœ ์žˆ๋Š” ์ƒํ™ฉ์ด๋‹ˆ๊นŒ ์ง„์งœ ํšจ์œจ์ ์ธ ํ™”๋ฉด์ „ํ™˜ ๋ฐฉ์‹์ธ๊ฑฐ ๊ฐ™์• !!๐Ÿ”ฅ

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์™€ ์ธ์ •์ •๋นˆ.. ์ฒœ์žฐ๊ฐ€... ๋‚˜๋„ ์‡ฝ์ƒฅ ํ•ด๋„ ๋ ๊นŒ ํ˜น์‹œ ~~~~~ ์ฉ๋‹ค ์ฉ๋‹ค

Copy link
Member Author

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 = "๋น„๋ฐ€๋ฒˆํ˜ธ"
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ฒœ์žฌ๋‹ค ์ •์ •๋นˆ..

Copy link

@noah0316 noah0316 left a 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 {

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 {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ด ์นœ๊ตฌ์˜ ์„œ๋ธŒํด๋ž˜์Šค๊ฐ€ ํ•„์š”ํ•˜์ง€ ์•Š์œผ๋ฉด ์•ž์— final ํ‚ค์›Œ๋“œ๋ฅผ ๋ถ™์ด๋Š”๊ฑด ์–ด๋–จ๊นŒ์š”?
์ปดํŒŒ์ผ๋Ÿฌ๊ฐ€ ์ด ํ‚ค์›Œ๋“œ๋ฅผ ๋ณด๊ณ  static dispatch๋ฅผ ํ•œ๋‹ค๋ฉด ์„ฑ๋Šฅ์ด ํ–ฅ์ƒ ๋  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค~!!

Copy link
Member Author

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 {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UI ๊ด€๋ จ๋œ ๋ถ€๋ถ„์€ extension์œผ๋กœ ๋”ฐ๋กœ ๋นผ์ฃผ์‹œ๋‹ˆ ๋ถ„๋ฆฌ๊ฐ€ ์ž˜๋˜์–ด์žˆ์–ด ๋ณด๊ธฐ ํŽธํ•˜๋„ค์š”.. ์งฑ์งฑ~!!๐Ÿ‘๐Ÿ‘

Comment on lines 80 to 83
$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)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ˆœ์„œ ํ†ต์ผ์„ฑ ์žˆ๋Š”๊ฑฐ ํŽธ์•ˆํ•˜๋„ค์š”...

Comment on lines 13 to 18
var isEmpty: Bool {
if text?.isEmpty ?? true {
return true
}
return false
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UITextField์˜ hasText๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ์ด ์นœ๊ตฌ๋Š” ์•ˆ์จ๋„ ๋˜์ง€ ์•Š๋‚˜์š”?! ๊ถ๊ธˆํ•ฉ๋‹ˆ๋‹ค~!!๐Ÿง

Copy link
Member Author

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 {

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]๋ฅผ ๋„ฃ์–ด์ฃผ์ง€ ์•Š์œผ๋ฉด ์ด๊ณณ์—์„œ ๋ฉ”๋ชจ๋ฆฌ ๋ˆ„์ˆ˜๊ฐ€ ๋ฐœ์ƒํ•  ๊ฒƒ ๊ฐ™๋„ค์š”~!!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@noah0316 ํ˜น์‹œ ์ธ๊ฐ„ ์œœ์…€ํ”„ ์ด์‹ ์ง€.. ์—ฌ๊ธฐ์ €๊ธฐ ์œ„ํฌ์…€ํ”„ ์ด๋™๊ฐ•์—ฐ ๋‹ค๋‹ˆ์‹œ๋„ค์š” ใ…‹ใ…‹

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@noah0316 ์˜ค ํ™•์ธ์—ฌ ใ…‹ใ…‹ใ…‹ ์ธ๊ฐ„ ๋ฉ”๋ชจ๋ฆฌ์„ธ์ด๋ฒ„ ์ด์‹œ๋„ค์š”...

@dev-jungbin dev-jungbin merged commit 43fe8db into main Apr 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
๐Ÿ“ฑ assignment - basic ๊ธฐ๋ณธ ๊ณผ์ œ
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT] iOS 1์ฐจ ๊ณผ์ œ - ๊ธฐ๋ณธ
6 participants