I have a scrollView with multiple textfields in it. I notice that I’m able to scroll only if I put my finger on the background (i.e. not on textfield). When I try to scroll the view with a finger on the text field it won’t scroll. Is this normal behavior ?
Share
If your text field had multiple lines to it, you (or your users) would expect and hope it would scroll the content of the text field and not the parent scroll view, yes?
Perhaps what you want to do is subclass your text field and if you detect a touch event, pass it up the responder chain to the parent scroll view if it’s a long touch (i.e. a scroll?). Or, if you don’t care about finger touches at all, your subclass can pass all touch events up to the parent view.
Or maybe just turn the
userInteractionEnabledproperty of the text field toFALSE.