问题描述
- tableView向上向下滚动时,段头视图做出改变
-
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
NSLog(@"%lf",scrollView.contentOffset.y);
NSInteger m = scrollView.contentOffset.y;
if ( m >= 0 )
{
UIView *view = (UIView *)[self.view viewWithTag:100];
view.backgroundColor = [UIColor colorWithRed:234/255.0 green:234/255.0 blue:234/255.0 alpha:0.5];}
现在向下是可以了,但是向上的时候没有效果啊
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
解决方案
http://www.cocoachina.com/bbs/read.php?tid=336018
解决方案二:
TableView头视图
时间: 2024-09-17 02:12:32