Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/102.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
iOS UIContainerView和UIScrollView滚动问题_Ios_Objective C_Uiscrollview_Uicontainerview - Fatal编程技术网

iOS UIContainerView和UIScrollView滚动问题

iOS UIContainerView和UIScrollView滚动问题,ios,objective-c,uiscrollview,uicontainerview,Ios,Objective C,Uiscrollview,Uicontainerview,scrollview中的容器视图出现问题 我有一个mainviewcontroller,它有以下控件 MainViewController UIScrollView --->UIImageView --->UIButton --->UIContainerView ChildViewController UIScrollView --->UIView with some controls 我需要达到的

scrollview中的容器视图出现问题

我有一个mainviewcontroller,它有以下控件

MainViewController

    UIScrollView
      --->UIImageView
      --->UIButton
      --->UIContainerView

ChildViewController

    UIScrollView
      --->UIView with some controls 
我需要达到的目标

应禁用First ChildViewController的滚动视图,并启用MainViewController的滚动视图。当UIbutton触摸顶栏(y=0)时滚动,然后禁用mainviewcontroller的滚动视图,打开childviewcontroller的滚动视图,用户可以滚动childviewcontroller

现在,当用户scroll的childviewcontroller和scrollview的contentOffset.y值小于或等于1时,我需要打开mainviewcontroller scrollview

我已通过两个视图控制器的scrollViewDidScroll事件达到上述条件。但滚动并不平滑。当childviewcontroller scrollview contentOffset.y值达到小于1时,滚动会受阻。有时它打开mainviewcontroller scrollview,有时不打开

请帮忙