UIScrollView聯動

来源:互联网 发布:如何查看java jdk版本 编辑:程序博客网 时间:2024/05/14 17:18

#pragma mark UIScrollViewDelegate

- (void)scrollViewDidScroll:(UIScrollView *)scrollView

{

    if (scrollView == theScrollView)

    {

        [theScrollView_1 setDelegate:nil];

        [theScrollView_1 setContentOffset:[theScrollView contentOffset]];

        [theScrollView_1 setDelegate:self];

    }

    else

    {

        [theScrollView setDelegate:nil];

        [theScrollView setContentOffset:[theScrollView_1 contentOffset]];

        [theScrollView setDelegate:self];

    }

}

原创粉丝点击