0

I have a UIScrollView in my project. I have a view controller I would like to add as a child of the UIScrollview. Would I just do that like this:

[scrollView addSubview:theViewController.view];

or is there a better way? (theView is a view, not the TV show)

Furthermore, I would like to be able to use a UIButton in scrollView's parent view controller to toggle whether or not the user is scrolling with scrollView and NOT interacting with theView or NOT scrolling with scrollview and interacting with theView. Should I just have that set the property:

scrollView.userInteractionEnabled = NO;

or would that disable interaction with theView because it's a child?

Thanks for your help!

1 Answer 1

3
  1. This is the proper way.
  2. On the scrollView, setScrollEnabled: to turn off scrolling.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.