📄 Dismissing the keyboard in a UIScrollView Swift Source Code
scrollView.keyboardDismissMode = .interactive
OR
scrollView.keyboardDismissMode = .onDrag
OR
scrollView.keyboardDismissMode = UIScrollViewKeyboardDismissModeInteractive;
OR
scrollView.keyboardDismissMode = UIScrollViewKeyboardDismissModeOnDrag;
📄 Dismissing the keyboard in a UIScrollView Delegate Swift Source Code
func scrollViewWillBeginDragging(_ scrollView: UIScrollView) {
self.view.endEditing(true)
}
🚀 REFERENCE
UIScrollViewDelegate - UIKit | Apple Developer Documentation
The methods declared by the UIScrollViewDelegate protocol allow the adopting delegate to respond to messages from the UIScrollView class and thus respond to, and in some affect, operations such as scrolling, zooming, deceleration of scrolled content, and s
developer.apple.com
Dismissing the keyboard in a UIScrollView
Alright, I have a couple of UITextFields and UITextViews inside a UIScrollView, and I'd like to set the keyboard to disappear whenever the scrollview is touched or scrolled (except when you touch d...
stackoverflow.com
iOS ) ScrollView에서 touchesBegan이 호출이 안된다면
안녕하세요 :) Zedd입니다. 보통 키보드가 올라와있는 상태에서, 화면을 누르면 키보드가 내려가게 하는 걸 touchesBegan으로 많이 하실겁니다. 참고 : <화면터치하여 키보드 내리기> 근데 ScrollView ⊂ View에서..
zeddios.tistory.com
댓글