<UI>设置某个控件在某个时候跟随某个scrollView的偏移量而移动

- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
    [self pageScroll];
    
    [self.refreshHeaderView headFreshScrollViewDidScroll:scrollView];
    //+|+
    NSLog(@"%f",scrollView.contentOffset.y);
    if (scrollView.contentOffset.y<0) {
        CGRect frame = CGRectMake(0, -20, 320, 40);
        self.flowdelegate.tagsButton.frame = CGRectMake(frame.origin.x, frame.origin.y-scrollView.contentOffset.y, frame.size.width, frame.size.height);
    }
}

 

posted @ 2013-01-17 11:58  白条围巾  阅读(3284)  评论(0编辑  收藏  举报