πŸ“± App Development Study/iOS🍎

[Udemy iOS & Swift Bootcamp] Keyboard 닀루기

ibelieveinme 2023. 7. 2. 19:12
728x90

μ±„νŒ… κΈ°λŠ₯ κ΅¬ν˜„ 쀑, ν‚€λ³΄λ“œκ°€ μž…λ ₯창을 κ°€λ¦¬λŠ” μ΄μŠˆκ°€ λ°œμƒν–ˆλ‹€.

ν‚€λ³΄λ“œκ°€ μœ„λ‘œ 올라올 λ•Œ, μž…λ ₯창도 ν•¨κ»˜ μ˜¬λΌμ™€μ•Ό μ‚¬μš©μžκ°€ λΆˆνŽΈν•˜μ§€ μ•Šμ„ 것이닀.

 

이 λ¬Έμ œμ™€ κ΄€λ ¨λœ 쒋은 λΌμ΄λΈŒλŸ¬λ¦¬κ°€ μžˆλ‹€. λ°”λ‘œ IQKeyboardManagerSwift.

 

https://cocoapods.org/pods/IQKeyboardManagerSwift

 

IQKeyboardManagerSwift

Codeless drop-in universal library allows to prevent issues of keyboard sliding up and cover UITextField/UITextView.

cocoapods.org

 

1. IQKeyboardManagerSwift μ„€μΉ˜ν•˜κΈ°

Podfile 에 pod 'IQKeyboardManagerSwift' ꡬ문을 μΆ”κ°€ν•΄μ£Όκ³  ν„°λ―Έλ„μ—μ„œ pod install 을 μž…λ ₯ν•΄μ€€λ‹€.

 

μ„€μΉ˜ μ™„λ£Œ ν›„ Pods 폴더λ₯Ό 보면 IQKeyboardManagerSwift κ°€ μ„€μΉ˜λ˜μ–΄ μžˆλŠ” 것을 확인할 수 μžˆλ‹€.

 

2. IQKeyboardManagerSwift μ‹€ν–‰ν•˜κΈ°

곡식 λ¬Έμ„œμ— λ‚˜μ™€ μžˆλŠ”λŒ€λ‘œ AppDelegate ν΄λž˜μŠ€μ—μ„œ IQKeyboardManagerSwiftλ₯Ό import ν•΄μ£Όκ³  μ‹€ν–‰ν•΄μ€€λ‹€. 

λ³Έ μ½”λ“œμ—μ„œ λ”± 2μ€„λ§Œ μΆ”κ°€ν•˜λ©΄ 끗.

 

μ‹€ν–‰λœ λͺ¨μŠ΅.

 

3. 기타 속성 μ μš©ν•˜κΈ°

Done λ²„νŠΌμ΄ λ‚˜μ˜€λŠ” 쀄을 μ—†μ• κ³  싢을 λ•Œ,

TextField κ°€ μ•„λ‹Œ λ‹€λ₯Έ 곳을 ν΄λ¦­ν•˜λ©΄ Keyboard λ₯Ό 내리고 싢을 λ•ŒλŠ” μœ„ 2쀄을 μΆ”κ°€ν•˜λ©΄ λœλ‹€.

 

적용된 λͺ¨μŠ΅.

 

또 λ‹€λ₯Έ 속성듀은 μ•„λž˜ λ¬Έμ„œλ₯Ό μ°Έμ‘°ν•΄μ„œ μ μš©ν•΄λ³΄μž.

https://github.com/hackiftekhar/IQKeyboardManager/wiki/Properties-&-Functions

 

Properties & Functions

Codeless drop-in universal library allows to prevent issues of keyboard sliding up and cover UITextField/UITextView. Neither need to write any code nor any setup required and much more. - hackiftek...

github.com

 

728x90