When trying to scroll a view by touching and dragging on a text field, similarly to how you would scroll around on the edit contacts view on the iPhone, the view will not mo
try with below approach. Just replace your UIScrollView with ScrollView and adds the code to your project.
SWIFT 4.1
class ScrollView: UIScrollView {
override func touchesShouldCancel(in view: UIView) -> Bool {
if type(of: view) == TextField.self || type(of: view) == UITextView.self {
return true
}
return super.touchesShouldCancel(in: view)
}
}