1

I have a scrollView with its content view and finally a subview on the content view. I would like to stop scrolling [scrollView scrollEnabled:NO] from the subview. Can I get at the method?

Lorenzo B
  • 33,216
  • 24
  • 116
  • 190
user1410595
  • 71
  • 1
  • 6

2 Answers2

4

I don't have Xcode in front of me, but can't you get at the superview with self.superview from your subview code?

For instance, like so:

[subview.superview scrollEnabled:NO];
Jon Friskics
  • 292
  • 2
  • 9
0

To stop scrolling [scrollView scrollEnabled:NO] from the subview? Maybe you need a viewController which control the views. Do you clear about the MVC?

Lorenzo B
  • 33,216
  • 24
  • 116
  • 190
lu yuan
  • 7,207
  • 9
  • 44
  • 78