All I am working on a legacy code that does the following
- creates a child view controller and add's it to the parent controller
- The child view controller is presented in the parent VC. So the animation starts from bottom towards the top, but only up to a specific location, leaving a height of 100 from the top.
- So I have a superview being displayed within the bounds (0,0), to (SCREEN_WIDTH, 0) and (0, 100) and (SCREEN_WIDTH, 100)
- The child view controller view is displayed below it.
- If you tap on any part of the screen that is a part of the parent view, you can swipe and up down, causing it to scroll. I don't want that. How do I disable scrolling of the superview when the child view is loaded?
I have tried the following solutions.
- Create a delegate protocol that parent VC implements to try to set the content off set to CGPointZero. This delegate is called from the child view.
Create a delegate protocol that parent VC implements and call the following function from the parent VC (which has a custom UIScrollView) that executes the following
self.view.scrollEnabled=NO;
This option did not work for me either. Is there any other way for me to do this?