I have a container view which contains an UIScrollView
and an UIView
, that are at the same level with the same frame
and bounds
, meaning they are subviews of the container view.
But the UIView
is on the top of the UIScrollView
. So the problem is that the buttons or gestures on the UIView
are responded to my touches, while the UIScrollView
is not, either scrolling or zooming.
So how can I make the UIScrollView
respond to scrolling and zooming and UIView
respond to touches at the same time when these two views are on the same level of the same super view?
UPDATE:
What I'm trying to do is I want to have a player control panel view which contains play/pause button, progress button etc., and behind this panel view there is a player render view which is in charge of rendering the video frames.
And I want to make the render view be able to be zoomed and scrolled, while the control panel view stays still.
The sample code is like this:
@implementation MyVC: UIViewController <UIScrollViewDelegate>
- (void)viewDidLoad
{
UIView *view = [UIView new];
UIScrollView *scrollView = [UIScrollView new];
[self.view addSubview:scrollView];
[self.view addSubview:view];
view.frame = scrollView.frame = self.view.frame;
//zooming and scrolling settings code
//now the problem is that scrollview does not respond to my zooming and scrolling
//while the view does.
}
@end