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

Feat/week1 UI #2

Merged
merged 2 commits into from
Oct 17, 2021
Merged

Feat/week1 UI #2

merged 2 commits into from
Oct 17, 2021

Conversation

i-colours-u
Copy link
Member

@i-colours-u i-colours-u commented Oct 8, 2021

πŸ“Œ κ΄€λ ¨ 이슈

#1 1차 과제 Issues

  • ν‚€λ³΄λ“œ λ„μ›Œμ‘Œμ„λ•Œ, κ°€λ¦¬λŠ” μš”μ†Œκ°€ 없도둝 μ²˜λ¦¬ν•˜κΈ°
  • λ²„νŠΌμ— λŒ€ν•œ Haptic 관리
  • UIμš”μ†Œλ“€μ— λŒ€ν•΄μ„œ λ”°λ‘œ 클래슀 λΆ„λ¦¬ν•΄μ„œ κ΄€λ¦¬ν•˜κΈ°
  • ν„°μΉ˜μ˜μ—­ κ³ λ €ν•˜κΈ°(λ²”μœ„κ°€ μž‘μ•„μ„œ ν„°μΉ˜ν•˜λŠ”κ²Œ νž˜λ“€μ§€ μ•Šλ„λ‘)
  • TextField Focus λ˜μ—ˆμ„ λ•Œ, λ‹€λ₯Έ Focus λ˜μ§€ μ•Šμ€ Textfield ν•˜κ³  κ΅¬λΆ„λ˜λ„λ‘ border Color μ²˜λ¦¬ν•˜κΈ°
  • TextField Toolbar λ§Œλ“€μ–΄μ„œ 처리
  • Module Factory νŒ¨ν„΄μœΌλ‘œ ν™”λ©΄μ „ν™˜ 처리

λ₯Ό μ€‘μ‹¬μœΌλ‘œ ν–ˆμ—ˆκ΅¬
졜초 ν”„λ‘œμ νŠΈλ‹€ λ³΄λ‹ˆκΉŒ .. μ•„λ¬΄λž˜λ„ μ„ΈνŒ…ν•˜λŠ” 파일이 μ’€ 많이 λ“€μ–΄κ°€κΈ΄ ν•˜λ„€μš”!

πŸ“Œ λ³€κ²½ 사항 및 이유

πŸ“Œ PR Point

πŸ“Œ μ°Έκ³  사항

ν”Όλ“œλ°±μ΄λ‚˜ μ§ˆλ¬Έμ‚¬ν•­μ€ 마ꡬ마ꡬ λ‚¨κ²¨μ£Όμ„Έμš”!! νŽΈν•˜κ²Œ!!!!!!

@Taehyeon-Kim
Copy link
Member

μ§€λ‚˜κ°€λŠ” ν–‰μΈμž…λ‹ˆλ‹€.. κ°€μž₯ μœ„μ— 있길래 λ“€μ–΄μ™€λ΄€λŠ”λ°μš”.
μ € λ§Œλ“œμ‹  것쀑에 ModuleFactoryκ°€ 무엇인지 κΆκΈˆν•©λ‹ˆλ‹€..
λ””μžμΈ νŒ¨ν„΄ 같은 것을 μ μš©ν•œκ±΄κ°€μš”??

@i-colours-u
Copy link
Member Author

μ§€λ‚˜κ°€λŠ” ν–‰μΈμž…λ‹ˆλ‹€.. κ°€μž₯ μœ„μ— 있길래 λ“€μ–΄μ™€λ΄€λŠ”λ°μš”. μ € λ§Œλ“œμ‹  것쀑에 ModuleFactoryκ°€ 무엇인지 κΆκΈˆν•©λ‹ˆλ‹€.. λ””μžμΈ νŒ¨ν„΄ 같은 것을 μ μš©ν•œκ±΄κ°€μš”??

-> Factory Method νŒ¨ν„΄μ΄λΌκ³  ν•΄μ„œ.. κ·Έ 클래슀 μΈμŠ€ν„΄μŠ€ μƒμ„±ν•˜λŠ” 결정은 무쑰건 ν•˜μœ„ 클래슀(factory)κ°€ ν•˜λ„λ‘ μ‹œν‚€λŠ” νŒ¨ν„΄μž…λ‹ˆλ‹Ή
즉, 객체 생성 자체λ₯Ό λΆ€λͺ¨ ν΄λž˜μŠ€κ°€ μ•„λ‹Œ μ„œλΈŒ ν΄λž˜μŠ€κ°€ ν•˜λ„λ‘? 객체 생성을 μΊ‘μŠν™”ν•˜λŠ” ν˜•νƒœμž…λ‹ˆλ‹€!!

보톡 ν™”λ©΄μ „ν™˜μ„ μ§„ν–‰ν• λ•Œ 클래슀 μΈμŠ€ν„΄μŠ€λ₯Ό 각 클래슀 λ‚΄μ—μ„œ μ§„ν–‰ν•˜κ²Œ λ˜λŠ”λ° factory둜 λ”°λ‘œ λ½‘μ•„λ‚΄μ„œ μ§„ν–‰ν•˜λŠ” ν˜•νƒœμ—μš”!!
protocol ν˜•νƒœλ‘œ μ„ μ–Έν•΄μ„œ μ“°λŠ” λ°©μ‹μž…λ‹ˆλ‹€!

@Taehyeon-Kim
Copy link
Member

μ§€λ‚˜κ°€λŠ” ν–‰μΈμž…λ‹ˆλ‹€.. κ°€μž₯ μœ„μ— 있길래 λ“€μ–΄μ™€λ΄€λŠ”λ°μš”. μ € λ§Œλ“œμ‹  것쀑에 ModuleFactoryκ°€ 무엇인지 κΆκΈˆν•©λ‹ˆλ‹€.. λ””μžμΈ νŒ¨ν„΄ 같은 것을 μ μš©ν•œκ±΄κ°€μš”??

-> Factory Method νŒ¨ν„΄μ΄λΌκ³  ν•΄μ„œ.. κ·Έ 클래슀 μΈμŠ€ν„΄μŠ€ μƒμ„±ν•˜λŠ” 결정은 무쑰건 ν•˜μœ„ 클래슀(factory)κ°€ ν•˜λ„λ‘ μ‹œν‚€λŠ” νŒ¨ν„΄μž…λ‹ˆλ‹Ή 즉, 객체 생성 자체λ₯Ό λΆ€λͺ¨ ν΄λž˜μŠ€κ°€ μ•„λ‹Œ μ„œλΈŒ ν΄λž˜μŠ€κ°€ ν•˜λ„λ‘? 객체 생성을 μΊ‘μŠν™”ν•˜λŠ” ν˜•νƒœμž…λ‹ˆλ‹€!!

보톡 ν™”λ©΄μ „ν™˜μ„ μ§„ν–‰ν• λ•Œ 클래슀 μΈμŠ€ν„΄μŠ€λ₯Ό 각 클래슀 λ‚΄μ—μ„œ μ§„ν–‰ν•˜κ²Œ λ˜λŠ”λ° factory둜 λ”°λ‘œ λ½‘μ•„λ‚΄μ„œ μ§„ν–‰ν•˜λŠ” ν˜•νƒœμ—μš”!! protocol ν˜•νƒœλ‘œ μ„ μ–Έν•΄μ„œ μ“°λŠ” λ°©μ‹μž…λ‹ˆλ‹€!

와.. ν•˜λ‚˜ λ°°μ›Œκ°‘λ‹ˆλ‹€ πŸ‘

Comment on lines 26 to +36
func press(for controlEvents: UIControl.Event = .touchUpInside, _ closure: @escaping()->()) {
self.clicked { _ in
if #available(iOS 14.0, *) {
self.addAction(UIAction { (action: UIAction) in closure() }, for: controlEvents)
} else {
@objc class ClosureSleeve: NSObject {
let closure:()->()
init(_ closure: @escaping()->()) { self.closure = closure }
@objc func invoke() { closure() }
}
let sleeve = ClosureSleeve(closure)
self.addTarget(sleeve, action: #selector(ClosureSleeve.invoke), for: controlEvents)
objc_setAssociatedObject(self, "\(UUID())", sleeve, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN)

if #available(iOS 14.0, *) {
self.addAction(UIAction { (action: UIAction) in closure()
self.clickedAnimation()
}, for: controlEvents)
} else {
@objc class ClosureSleeve: NSObject {
let closure:()->()
init(_ closure: @escaping()->()) { self.closure = closure }
@objc func invoke() { closure() }
Copy link
Member

Choose a reason for hiding this comment

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

Closure λ„ˆλ¬΄ μž˜μ“°μ‹œλ„€μš” . . 훔쳐가고 μ‹Άλ„€μš” .. .. μ•„λ‹ˆ ν›”μ³κ°‘λ‹ˆλ‹€

Copy link
Member Author

Choose a reason for hiding this comment

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

맀번 ν”Œμ ν• λ•Œλ§ˆλ‹€ 고정해두고 μ“°λŠ”λ° 맀우 νŽΈν•˜κ²Œ μ“°κ³ μžˆμλ‹ˆλ‹€..
일일이 addTargetν•˜κ³  λ©”μ„œλ“œ μ—°κ²°μ•ˆν•˜κ³  press둜 λΉΌλŠ”κ²Œ νŽΈν•΄μ„œ μ‚¬μš©μ€‘μ΄μ—μš”!!!

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.

와 이거 μ’‹λ„€μš”... 저도 μ€μ€ν• λž˜μš”

Choose a reason for hiding this comment

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

와 저도 쀍쀍 ν•©λ‹ˆλ‹€..

Choose a reason for hiding this comment

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

μ£Όμ›Œκ°‘λ‹ˆλ‹€

Comment on lines +28 to +40
if #available(iOS 14.0, *) {
self.addAction(UIAction { (action: UIAction) in closure()
self.clickedAnimation()
}, for: controlEvents)
} else {
@objc class ClosureSleeve: NSObject {
let closure:()->()
init(_ closure: @escaping()->()) { self.closure = closure }
@objc func invoke() { closure() }
}
let sleeve = ClosureSleeve(closure)
self.addTarget(sleeve, action: #selector(ClosureSleeve.invoke), for: controlEvents)
objc_setAssociatedObject(self, "\(UUID())", sleeve, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN)
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.

button.press {
 // λ²„νŠΌμ„ λˆŒλ €μ„ λ•Œ λ™μž‘ν•˜λŠ” μ½”λ“œλ“€
}

μ΄λ ‡κ²Œ μ“°κΈ° μœ„ν•΄μ„œ λ‹€μŒκ³Ό 같이 Extension을 λΊ΄λ†¨λŠ”λ°μš”...
κ·Έ clickAnimation을 넣은 μ΄μœ λŠ” , 주석에 μ“΄κ±°μ²˜λŸΌ λ²„νŠΌμ„ λˆ„λ₯Έ 효과λ₯Ό μ£ΌκΈ° μœ„ν•΄ μ€„μ–΄λ“€μ—ˆλ‹€.. μ»€μ‘Œλ‹€ μ• λ‹ˆλ©”μ΄μ…˜μ„ 짧게 μ€˜μ„œ μ²˜λ¦¬ν•˜κ³  μžˆμŠ΄λ‹ˆλ‹€.. λ‹€λ₯Έ ν”„λ‘œλ•νŠΈ λ³΄λ‹ˆκΉŒ μ΄λŸ°μ‹μœΌλ‘œ λ²„νŠΌ μ• λ‹ˆλ©”μ΄μ…˜ μ •μ˜ν•œκ³³μ΄ λ§Žμ•„μ„œ.. μ°Έκ³ ν•΄λ΄€μŠ΅λ‹ˆλ‹€!!!

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

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.

γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹

Copy link
Member Author

Choose a reason for hiding this comment

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

μ œκ°€ λΉˆμΉΈμ„ μ’€ 많이 μ¨μ„œ ^^,,,,, μ‘°μ‹¬ν• κ²Œμš”...

@heerucan
Copy link
Member

heerucan commented Oct 8, 2021

일단 였늘 μ•ˆμ— 달렀면 이 μ½”λ“œλ“€ 정말 λͺ¨λ₯΄κ² μ–΄μ„œ 말이져 λ‚΄ 살아생전 처음 λ³΄λŠ” μ½”λ“œλ“€μ΄λΌ γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹ 일단 λ‚΄μΌλ‘œ λ―Έλ£¨κ² μŠ΅λ‹ˆλ‹€.

일단 μ œκ°€ 달 수 μžˆλŠ” 것은 빈 칸을 μ£Όμ˜ν•˜μ‹œλ©΄ 쒋을 것 κ°™κ³ μš”,,
(λ‚˜λ ˆμ΄λ””... 첫 μ•±μžΌ μ½”λ“œλ¦¬λ·°μ—μ„œ 빈 칸으둜 34κ°œμΈκ°€μ˜ μ½”λ“œ 리뷰λ₯Ό λ°›μ•˜μ..)
그리고.. 쓰지 μ•ŠλŠ” MarkλŠ” μ§€μ›Œμ£Όμ‹¬ μ–΄λ– ν•œμ§€,,,,,
근데 ν•¨μˆ˜λͺ… 뒀에 곡백 없이 κ΄„ν˜Έλ₯Ό λΆ™μ—¬μ„œ μ“°λŠ”λ° 이건 μ‚¬λžŒλ§ˆλ‹€ λ‹€λ₯Έ 건지 κΆκΈˆν•©λ‹ˆλ‹€.

μ•„λ‹ˆ,, 근데 손배야. 이런 μ‹μœΌλ‘œ. μ–΄? μ΄λ ‡κ²ŒκΉŒμ§€ ν•˜μ…”μ•Ό 됐냐고. μ–΄? μ§€κΈˆ ? μ–΄? μ•½κ°„. μ–΄? 정말.. ꡉμž₯히 멋지고.. 이런 μ‹μœΌλ‘œλ„ ν•  수 μžˆκ΅¬λ‚˜ ν•˜κ³  많이 λ°°μ›λ‹ˆλ‹€.. 사싀 일단 λ‹€μ–‘ν•˜κ²Œ μ»΄ν¬λ„ŒνŠΈλ₯Ό λΉΌλŠ” κ±Έ μ•Œμ•˜κ³ μš”. 근데 첫 νŒμ— 와닀닀 μ•ŒκΈ°μ— λ„˜ 어렡기에 μ°¨κ·Όμ°¨κ·Ό 곡뢀해보도둝 ν•˜κ² μŠ΅λ‹ˆλ‹€..πŸ‘πŸ»

λ‚΄ μ½”λ“œλŠ” 쏘 큣 μ•€ νƒ€μ΄λ‹ˆ μ•€ λ―Έμ„Έλ¨Όμ§€μŠ€... γ…‹

@i-colours-u
Copy link
Member Author

일단 였늘 μ•ˆμ— 달렀면 이 μ½”λ“œλ“€ 정말 λͺ¨λ₯΄κ² μ–΄μ„œ 말이져 λ‚΄ 살아생전 처음 λ³΄λŠ” μ½”λ“œλ“€μ΄λΌ γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹γ…‹ 일단 λ‚΄μΌλ‘œ λ―Έλ£¨κ² μŠ΅λ‹ˆλ‹€.
일단 μ œκ°€ 달 수 μžˆλŠ” 것은 빈 칸을 μ£Όμ˜ν•˜μ‹œλ©΄ 쒋을 것 κ°™κ³ μš”,, (λ‚˜λ ˆμ΄λ””... 첫 μ•±μžΌ μ½”λ“œλ¦¬λ·°μ—μ„œ 빈 칸으둜 34κ°œμΈκ°€μ˜ μ½”λ“œ 리뷰λ₯Ό λ°›μ•˜μ..) 그리고.. 쓰지 μ•ŠλŠ” MarkλŠ” μ§€μ›Œμ£Όμ‹¬ μ–΄λ– ν•œμ§€,,,,, 근데 ν•¨μˆ˜λͺ… 뒀에 곡백 없이 κ΄„ν˜Έλ₯Ό λΆ™μ—¬μ„œ μ“°λŠ”λ° 이건 μ‚¬λžŒλ§ˆλ‹€ λ‹€λ₯Έ 건지 κΆκΈˆν•©λ‹ˆλ‹€.

--> λ„€ 빈칸과 마크ꡬ문 μ‘°μ‹¬ν• κ²Œμš”... μ œκ°€ λ§ˆν¬κ΅¬λ¬Έμ„ ν…œν”Œλ¦ΏμœΌλ‘œ μŠ΅κ΄€μ μœΌλ‘œ λ§Œλ“€μ–΄ λ„£μ–΄μ„œ 고건 쑰심해보도둝 ν•˜κ²ŸμŠ΅λ‹ˆλ‹€... 그리고 ν•¨μˆ˜λͺ… 뒀에 κ΄„ν˜Έ λΆ™μ΄λŠ”κ±° 이것도 사싀 code convention으둜 μ •ν•˜κΈ° λ‚˜λ¦„μΈλ°... λ£¨ν¬λ‹˜μ€ 뭐가 더 보기 νŽΈν• κΉŒμš” ν•˜ν•˜ 이건 닀같이 λ…Όμ˜ 해봐야할 λ¬Έμ œμΌκ²ƒκ°™λ„€μš”!!

μ•„λ‹ˆ,, 근데 손배야. 이런 μ‹μœΌλ‘œ. μ–΄? μ΄λ ‡κ²ŒκΉŒμ§€ ν•˜μ…”μ•Ό 됐냐고. μ–΄? μ§€κΈˆ ? μ–΄? μ•½κ°„. μ–΄? 정말.. ꡉμž₯히 멋지고.. 이런 μ‹μœΌλ‘œλ„ ν•  수 μžˆκ΅¬λ‚˜ ν•˜κ³  많이 λ°°μ›λ‹ˆλ‹€.. 사싀 일단 λ‹€μ–‘ν•˜κ²Œ μ»΄ν¬λ„ŒνŠΈλ₯Ό λΉΌλŠ” κ±Έ μ•Œμ•˜κ³ μš”. 근데 첫 νŒμ— 와닀닀 μ•ŒκΈ°μ— λ„˜ 어렡기에 μ°¨κ·Όμ°¨κ·Ό 곡뢀해보도둝 ν•˜κ² μŠ΅λ‹ˆλ‹€..πŸ‘πŸ»
λ‚΄ μ½”λ“œλŠ” 쏘 큣 μ•€ νƒ€μ΄λ‹ˆ μ•€ λ―Έμ„Έλ¨Όμ§€μŠ€... γ…‹

--> μ œκ°€ λΉˆμΉΈμ„ μŠ΅κ΄€μ μœΌλ‘œ μ—„μ²­ 많이 μ¨μ„œ ^^,,, λ„€ μ•žμœΌλ‘œ λ§žμΆ°λ‚˜κ°ˆκ²Œμš” ..... 루희 μ„ λ°°λ‹˜μ—κ²Œ κ±°μŠ¬λ¦¬μ§€ μ•Šλ„λ‘... μ•žμœΌλ‘œ 써보도둝 ν•˜κ² μŠ΅λ‹ˆλ‹€ ν•˜λ‚˜λ‘˜μ…‹ ν™”μ΄νŒ…!

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.

많이 λ°°μ›Œκ°‘λ‹ˆλ‹€πŸ”₯πŸ”₯
그리고 직관적인 넀이밍이 μ™œ μ€‘μš”ν•œμ§€ μ•Œκ² μ–΄μš”,,λ­ν•˜λŠ” ν•¨μˆ˜μΈμ§€ λ™‡λ˜­πŸ‘πŸ»
와..λ„ˆλ¬΄ λ§Žμ΄ν•΄μ„œ ν„± μ•„ν”„λ„€μš”..

Comment on lines +28 to +40
if #available(iOS 14.0, *) {
self.addAction(UIAction { (action: UIAction) in closure()
self.clickedAnimation()
}, for: controlEvents)
} else {
@objc class ClosureSleeve: NSObject {
let closure:()->()
init(_ closure: @escaping()->()) { self.closure = closure }
@objc func invoke() { closure() }
}
let sleeve = ClosureSleeve(closure)
self.addTarget(sleeve, action: #selector(ClosureSleeve.invoke), for: controlEvents)
objc_setAssociatedObject(self, "\(UUID())", sleeve, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN)
Copy link
Member

Choose a reason for hiding this comment

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

κ΅¬λ™μ˜μƒ 보고 μ™”λŠ”λ° 진촀 λ””ν…ŒμΌ 짱..πŸ‘πŸ» λ°°μ›Œκ°‘λ‹ˆλ‹€πŸ”₯

Comment on lines +31 to +46
private func setDefaultSetting(){
layer.cornerRadius = 8
self.titleLabel?.font = .boldSystemFont(ofSize: 16)
setState(isEnable: false)
}

func setButtonTitle(title : String){
self.setTitle(title, for: .normal)
}

func setState(isEnable : Bool){
self.isEnabled = isEnable
self.titleLabel?.textColor = isEnable ? .white : .gray
self.tintColor = isEnable ? .white : .gray
self.layer.backgroundColor = isEnable ? UIColor.mainBlue.cgColor : UIColor.lightGray.cgColor
}
Copy link
Member

Choose a reason for hiding this comment

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

μš”κ±°λŠ” λ²„νŠΌμ΄ enableν•  λ•Œμ™€ 아닐 λ•Œμ˜ μƒνƒœλ₯Ό λ‚˜λˆ μ„œ μ„ΈνŒ…ν•΄μ£ΌλŠ”κ±°μ£ ..?
λ²„νŠΌμ΄λ‚˜ ν…μŠ€νŠΈν•„λ“œ 같이 λ°˜λ³΅λ˜μ–΄ μ‚¬μš©λ˜λŠ” 것듀을 클래슀둜 λ”°λ‘œ λΆ„λ¦¬ν•΄μ„œ μ“°μ‹œλŠ” κ±° μΈμƒκΉŠλ„€μš”..μ§„μ§œ 졜고..πŸ‘πŸΌπŸ‘πŸΌ

Copy link
Member Author

Choose a reason for hiding this comment

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

μ»€μŠ€ν…€ν•œ λ²„νŠΌμ΄λ‹€ λ³΄λ‹ˆκΉŒ, enable/disable에 λŒ€ν•œ μŠ€νƒ€μΌμ„ 미리 μ§€μ •ν•΄μ„œ ν•¨μˆ˜λ‘œ λΉΌλ‘”κ±°μ—μš”!!


private func setUIComponents(){
okButton.setButtonTitle(title: I18N.Components.ok)
okButton.setState(isEnable: true)
Copy link
Member

Choose a reason for hiding this comment

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

ν΄λž˜μŠ€μ— λ²„νŠΌ μƒνƒœμ— 따라 μ„ΈνŒ…ν•΄λ‘μ‹ κ±° μš”κΈ°μ„œ ν˜ΈμΆœμ„ 톡해 enable μƒνƒœμΌ λ•Œμ˜ κ°’μœΌλ‘œ μ„ΈνŒ…λ˜λ„λ‘ ν•˜λŠ”κ±΄κ°€μš”??πŸ€”

Copy link
Member Author

Choose a reason for hiding this comment

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

μ•„ μš”κ±° setState(true)λŠ” μ•„λ¬΄λŸ° state 섀정을 μ•ˆν–ˆμ„λ•Œ λ²„νŠΌ 기본값이 ν™œμ„±ν™”λœ μƒνƒœλ‘œ 두고 μ‹Άμ–΄μ„œ 그랬던건데..
μš”κ±΄ 쑰금 μ§€μ›Œλ„ λ˜λŠ” μ½”λ“œκΈ΄ ν•˜λ„€μ—¬... 발견 κ°μ‚¬ν•©λ‹ˆλ‹€ ^__^

Comment on lines +14 to +18
private var isAllInformationFilled = false{
didSet{
signupButton.setState(isEnable: isAllInformationFilled)
}
}
Copy link
Member

Choose a reason for hiding this comment

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

didSet ν™œμš©ν•˜λŠ” 법 λ°°μ›Œκ°‘λ‹ˆλ‹€πŸ”₯πŸ”₯
훨씬 κΉ”λ”ν•˜λ„€μš”πŸ‘πŸ»πŸ‘πŸ»

Copy link
Member

@jumining jumining left a comment

Choose a reason for hiding this comment

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

swiftλ₯Ό μ’€ 더 배운 뒀에 λ‹€μ‹œ μ§€ν›ˆλ‹˜ μ½”λ“œ 보러 였면 배울점이 더 많이 보일 것 κ°™μ•„μš”γ…Žγ…Ž λ‹€μ‹œ 또 μ˜€κ² μŠ΅λ‹ˆλ‹€! μ‚¬μš©μžλ₯Ό μœ„ν•œ μ‹œκ°μ  효과 μ• λ‹ˆλ©”μ΄μ…˜ λ„£μœΌμ‹ κ±° μΈμƒκΉŠμ–΄πŸ˜€ μ„Έμ‹¬ν•œ μ½”λ“œ λ³΄λ©΄μ„œ 많이 μ•Œμ•„κ°‘λ‹ˆλ‹€! λ³Ό μ½”λ“œκ°€ λ§Žμ€λ§ŒνΌ 배울 μ½”λ“œκ°€ λ§Žμ•˜μ–΄μš”..!

Comment on lines +19 to +24
private var isPasswordVisible = false{
didSet{
passwordTextField.isSecureTextEntry = !isPasswordVisible
setCheckboxStateImage()
}
}
Copy link
Member

Choose a reason for hiding this comment

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

κ΅¬ν˜„ λͺ»ν–ˆλ˜ λ„μ „κ³Όμ œ 뢀뢄인데 μ½”λ“œ λ³΄λ©΄μ„œ λ°°μ›Œκ°‘λ‹ˆλ‹€!

Comment on lines +28 to +40
if #available(iOS 14.0, *) {
self.addAction(UIAction { (action: UIAction) in closure()
self.clickedAnimation()
}, for: controlEvents)
} else {
@objc class ClosureSleeve: NSObject {
let closure:()->()
init(_ closure: @escaping()->()) { self.closure = closure }
@objc func invoke() { closure() }
}
let sleeve = ClosureSleeve(closure)
self.addTarget(sleeve, action: #selector(ClosureSleeve.invoke), for: controlEvents)
objc_setAssociatedObject(self, "\(UUID())", sleeve, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN)
Copy link
Member

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 +41
class CustomBlueButton : UIButton{

// Storyboardsμ—μ„œ μ§€μ •ν• λ•Œ 호좜됨
required init(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)!
setDefaultSetting()
}

override init(frame: CGRect){
super.init(frame: frame)
setDefaultSetting()
}

init() {
super.init(frame:CGRect.zero)
setDefaultSetting()
}

private func setDefaultSetting(){
layer.cornerRadius = 8
self.titleLabel?.font = .boldSystemFont(ofSize: 16)
setState(isEnable: false)
}

func setButtonTitle(title : String){
self.setTitle(title, for: .normal)
}

func setState(isEnable : Bool){
Copy link
Member

Choose a reason for hiding this comment

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

λ²„νŠΌκ°™μ€ 것도 λ°˜λ³΅λ˜λŠ” ν˜•νƒœλ‹ˆκΉŒ 클래슀 μ‚¬μš©ν•΄μ„œ μ €λ ‡κ²Œ ν•˜λ©΄ 더 νŽΈν•˜κ² λ„€μš”...! 쒋은 μ½”λ“œ λ°°μ›Œκ°‘λ‹ˆλ‹€!

Comment on lines +71 to +73
protocol CustomInputTextFieldDelegate{
func textfieldChanged(text : String)
}
Copy link
Member

Choose a reason for hiding this comment

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

protocol을 μ²˜μŒλ΄μ„œ κ΅¬κΈ€λ§ν•˜κ³ μ™”λŠ”λ°, μ—¬κΈ°μ„œλ„ κΌ­ μ¨μ•Όν•˜λŠ”κ±΄κ°€μš”?? μ•ˆμ“°λ©΄ μ•ˆλ˜λŠ”κ±΄μ§€ κΆκΈˆν•©λ‹ˆλ‹€!

Copy link
Member Author

@i-colours-u i-colours-u Oct 15, 2021

Choose a reason for hiding this comment

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

μ œκ°€ Delegateλ₯Ό μ‚¬μš©ν•œ μ΄μœ λŠ” κ·Έ
ν…μŠ€νŠΈ ContainerViewμ—μ„œ ν…μŠ€νŠΈκ°€ λ³€ν• λ•Œ VCμ—κ²Œ λ°”λ‘œλ°”λ‘œ κ°„νŽΈν•˜κ²Œ μ•Œλ¦¬κΈ° μœ„ν•΄μ„œ λ”°λ‘œ Protocol을 μž‘μ„±ν•΄μ„œ μ“΄κ±°κ΅¬μš”! 이후에 ν…μŠ€νŠΈ ContainerViewμ—μ„œ λ‹€μ–‘ν•œ μ΄λ²€νŠΈλ“€μ„ κ΄€λ¦¬ν•˜κΈ° μœ„ν•΄ ν”„λ‘œν† μ½œμ„ μ‚¬μš©ν•œκ±°μ§€λ§Œ, λ‹€λ₯Έμ‹μœΌλ‘œλ„ μ–Όλ§ˆλ“ μ§€ μ²˜λ¦¬κ°€ κ°€λŠ₯ν•˜κΈ°μ—... 자유둭게 μ“°λ©΄ λ˜λŠ” λΆ€λΆ„μΌκ±°κ°™μ•„μš”!!

@i-colours-u i-colours-u merged commit 5703666 into main Oct 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants