Steven 7 月之前
父節點
當前提交
e46d3d1bab
共有 1 個文件被更改,包括 11 次插入0 次删除
  1. 11 0
      KulexiuForStudent/KulexiuForStudent/Module/Home/Controller/HomeViewController.m

+ 11 - 0
KulexiuForStudent/KulexiuForStudent/Module/Home/Controller/HomeViewController.m

@@ -933,12 +933,15 @@
         [self.noticeView mas_updateConstraints:^(MASConstraintMaker *make) {
             make.height.mas_equalTo(height);
         }];
+        self.noticeViewHeight = height;
     }
     else {
         self.noticeView.hidden = YES;
+        self.noticeViewHeight = CGFLOAT_MIN;
         [self.noticeView mas_updateConstraints:^(MASConstraintMaker *make) {
             make.height.mas_equalTo(CGFLOAT_MIN);
         }];
+        
     }
     self.noticeScrollView.titlesGroup = self.noticeTitleArray;
 }
@@ -948,9 +951,17 @@
     if (model) {
         [self.courseView configCourseMessage:model];
         self.courseView.hidden = NO;
+        self.courseViewHeight = [HomeRecentCourseView getViewHeight];
+        [self.courseView mas_updateConstraints:^(MASConstraintMaker *make) {
+            make.height.mas_equalTo(self.courseViewHeight);
+        }];
     }
     else {
         self.courseView.hidden = YES;
+        self.courseViewHeight = CGFLOAT_MIN;
+        [self.courseView mas_updateConstraints:^(MASConstraintMaker *make) {
+            make.height.mas_equalTo(self.courseViewHeight);
+        }];
     }
 }