Steven 7 mesiacov pred
rodič
commit
e46d3d1bab

+ 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);
+        }];
     }
 }