|
@@ -286,14 +286,15 @@
|
|
|
}
|
|
|
|
|
|
- (void)refreshHeadHeight {
|
|
|
- self.headViewHeight = self.bannerViewHeight + self.buttonViewHeight + self.noticeViewHeight + self.courseViewHeight + self.albumViewHeight + self.musicViewHeight + self.talentViewHeight + self.liveViewHeight + self.videoViewHeight;
|
|
|
+ CGFloat bottomSpace = 20.0f;
|
|
|
+ self.headViewHeight = self.bannerViewHeight + self.buttonViewHeight + self.noticeViewHeight + self.courseViewHeight + self.albumViewHeight + self.musicViewHeight + self.talentViewHeight + self.liveViewHeight + self.videoViewHeight + bottomSpace;
|
|
|
[self.pagerView reloadData];
|
|
|
}
|
|
|
|
|
|
- (void)configUI {
|
|
|
[self configHeadView];
|
|
|
|
|
|
- _categoryView = [[JXCategoryTitleView alloc] initWithFrame:CGRectMake(0, kNaviBarHeight, kScreenWidth, 50)];
|
|
|
+ _categoryView = [[JXCategoryTitleView alloc] initWithFrame:CGRectMake(0, kNaviBarHeight, kScreenWidth, 44)];
|
|
|
self.categoryView.backgroundColor = [UIColor clearColor];
|
|
|
self.categoryView.titles = self.titles;
|
|
|
self.categoryView.delegate = self;
|
|
@@ -722,7 +723,7 @@
|
|
|
|
|
|
- (void)refreshViewLocation {
|
|
|
// 如果有课程和公告 且有按钮
|
|
|
- CGFloat buttonViewDefaultHeight = self.buttonArray.count > 5 ? [HomeButtonView getViewHeight] : [HomeButtonView getViewHeight] - 10;
|
|
|
+ CGFloat buttonViewDefaultHeight = self.buttonArray.count > 5 ? [HomeButtonView getViewHeight] : [HomeButtonView getViewHeight] - 20;
|
|
|
|
|
|
if (self.noticeTitleArray.count && self.recentCourseModel && self.buttonArray.count) {
|
|
|
self.noticeViewHeight = [PublicNoticeView getViewHeight];
|
|
@@ -933,7 +934,7 @@
|
|
|
}
|
|
|
|
|
|
- (NSUInteger)heightForPinSectionHeaderInPagerView:(JXPagerView *)pagerView {
|
|
|
- return 50;
|
|
|
+ return 44;
|
|
|
}
|
|
|
|
|
|
- (NSInteger)numberOfListsInPagerView:(JXPagerView *)pagerView {
|
|
@@ -990,6 +991,26 @@
|
|
|
return [gestureRecognizer isKindOfClass:[UIPanGestureRecognizer class]] && [otherGestureRecognizer isKindOfClass:[UIPanGestureRecognizer class]];
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+- (void)pagerView:(JXPagerView *)pagerView mainTableViewDidScroll:(UIScrollView *)scrollView {
|
|
|
+ NSLog(@"sscroll content offset y %f", scrollView.contentOffset.y);
|
|
|
+ CGFloat height = self.headViewHeight;
|
|
|
+ CGFloat space = scrollView.contentOffset.y;
|
|
|
+ if (space > 0) {
|
|
|
+ self.navView.lineView.hidden = NO;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ self.navView.lineView.hidden = YES;
|
|
|
+
|
|
|
+ }
|
|
|
+ if (space >= height) {
|
|
|
+ self.categoryView.backgroundColor = [UIColor whiteColor];
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ self.categoryView.backgroundColor = [UIColor clearColor];
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
#pragma mark - TYCyclePagerViewDataSource代理
|
|
|
- (NSInteger)numberOfItemsInPagerView:(TYCyclePagerView *)pageView {
|
|
|
return self.bannerArray.count;
|
|
@@ -1176,13 +1197,13 @@
|
|
|
return CGSizeMake(KPortraitWidth * 0.83, 240);
|
|
|
}
|
|
|
else if (collectionView == self.talentCollectionView) {
|
|
|
- return CGSizeMake(110, 146);
|
|
|
+ return CGSizeMake(110, 150);
|
|
|
}
|
|
|
else if (collectionView == self.videoCollectionView) {
|
|
|
- return CGSizeMake((KPortraitWidth - 28 - 11) / 2.0f, 153);
|
|
|
+ return CGSizeMake((KPortraitWidth - 28 - 11) / 2.0f, 157);
|
|
|
}
|
|
|
else {
|
|
|
- return CGSizeMake((KPortraitWidth - 28 - 11) / 2.0f, 153);
|
|
|
+ return CGSizeMake((KPortraitWidth - 28 - 11) / 2.0f, 157);
|
|
|
}
|
|
|
}
|
|
|
|