更新UI
This commit is contained in:
@@ -226,6 +226,7 @@ static const CGFloat JXheightForHeaderInSection = 50;
|
||||
// 不要渐变:小于阈值 alpha=0,达到阈值(吸顶)后 alpha=1
|
||||
BOOL shouldWhite = (thresholdDistance > 0.0 && scrollView.contentOffset.y >= (thresholdDistance - 0.5));
|
||||
self.naviBGView.alpha = shouldWhite ? 1.0 : 0.0;
|
||||
self.userHeaderView.alpha = shouldWhite ? 0 : 1.0;
|
||||
|
||||
// 分类条背景:未吸顶时透明,吸顶后白色
|
||||
if (shouldWhite != self.categoryIsWhite) {
|
||||
@@ -234,6 +235,7 @@ static const CGFloat JXheightForHeaderInSection = 50;
|
||||
self.categoryView.backgroundColor = bg;
|
||||
// 内部 collectionView 也同步,避免出现条纹底色
|
||||
self.categoryView.collectionView.backgroundColor = bg;
|
||||
self.naviBGView.backgroundColor = bg;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user