0

I'm making an App for iPad.

But I faced some troubles because of Touch Event of ScrollView. I have tried with iphone sample code [link], but I can't get what I want through this sample. The reason is that my app is only for iPad.

I add my sketchy pic.

-- image link : https://lh5.googleusercontent.com/-x7TsXmxv1XU/TsYSkEh-3VI/AAAAAAAAAB8/ECn3MjiFF6Y/s512/IMG_20111118_170519.jpg

I add UIScrollView on ViewController, and add UIViews on this UIScrollView.

UIViews on this UIScrollView must be hidden outside of UIScrollView. But can't be hidden. @.@ And I can't use touch event on UIScrollView - left and right. What I want is how to use touch event on scroll view.

I searched about this in Stack Overflow and google. I could find many articles, but unfortunately I can't understand clearly.

Please explain me more easily. I'm a beginner programmer.

hyekyung
  • 671
  • 2
  • 14
  • 27
  • Your question is very unclear. Basically, you're only asking how to do 'something' with 'touch events' in a scrollview. Both of these terms are very broad. You'll have to be more specific, or we can't answer your question. – Aberrant Nov 18 '11 at 09:09
  • @Aberrant Thanks your advice. Truly says that I don't know how to way uploading my sample source code. If I don't success, will ask again with specific code. Re-Thanks! – hyekyung Nov 18 '11 at 09:46

1 Answers1

0

make your scrollview to clip subviews by it's bounds:

scrollView.clipToBounds = YES;

this will resolve your "un-hidden views" issue

Denis
  • 6,313
  • 1
  • 28
  • 27
  • Ah! Thanks!!! But I'm sorry that my question is incorrect. What I want is how to use touch event on scroll view. So now edited my writing. – hyekyung Nov 18 '11 at 08:58
  • why do you need raw touch-event? UIScrollViewDelegate implementation is a place, where you need to handle all scrolling events – Denis Nov 18 '11 at 09:16