- (void)scrollViewDidScroll:(UIScrollView *)scrollView{
NSLog(@"self.tableView.contentOffset.y = %f",self.tableView.contentOffset.y);
UIColor *color=[UIColor blackColor];
CGFloat offset=scrollView.contentOffset.y;
if (offset<0) {
self.navigationController.navigationBar.backgroundColor = [color colorWithAlphaComponent:0];
}else {
CGFloat alpha=1-((64-offset)/64);
self.navigationController.navigationBar.backgroundColor=[color colorWithAlphaComponent:alpha];
}
}
/**
* Author:Jn
* GitHub:https://github.com/JnKindle
* cnblogs:http://www.cnblogs.com/JnKindle
*/