TPKeyboardAvoiding icon indicating copy to clipboard operation
TPKeyboardAvoiding copied to clipboard

contentsize allowing horizontal scrolling as well as vertical

Open chadkouse opened this issue 11 years ago • 1 comments

My scroll view works as expected before I open the keyboard. After the keyboard has been displayed I can scroll my view horizontally as well as vertically -- should only go vertical.

The contentSize is set correctly, I'm assuming this may be related to the Note in the readme but wanted to hear any workarounds or info

chadkouse avatar Oct 31 '13 20:10 chadkouse

It sounds like there might be some views that lie outside the frame, which are causing this method to calculate a content size of greater width than the scroll view's frame. Possible fixes: Either change the views so they don't overlap the edge, or set the content size of the scroll view manually (or use that method to do a rough calculation, then refine it by setting the width to the width of the frame, on viewDidLoad/etc)

michaeltyson avatar Nov 27 '13 23:11 michaeltyson