如何滚动包含UIView的UIScrollView?
问题描述:
UIView * blueView = [[UIView alloc] initWithFrame:CGRectMake(10, 10, 100, 100)];
blueView.backgroundColor = [UIColor blueColor];
[scrollView addSubview:blueView];
scrollView.contentSize = CGSizeMake(1500, 2000);
我可以在大多数scrollView中拖动滚动就好,但在blueView中触摸开始时拖动不起作用。如何滚动包含UIView的UIScrollView?
如何在UIView(本例中为blueView)内启动的触摸滚动UIScrollView?
蓝景是不是第一个响应,蓝景的下一个响应者是滚动视图等
似乎很基本的,但现在我卡住了一段时间。我错过了什么?谢谢。
答
尝试设置blueView.userInteractionEnabled = NO
。