Forráskód Böngészése

1.学生提交课后评价默认五颗星
2、课程详情页的进入教室按钮固定显示在底部
3.已点评作业不显示底部按钮

Steven 3 hónapja
szülő
commit
123731fcf7

+ 19 - 6
KulexiuForStudent/KulexiuForStudent/Module/Course/AccompanyCourse/Controller/AccompanyDetailViewController.m

@@ -127,11 +127,18 @@
     else {
         self.canModify = YES;
     }
+    
     if ([self.homeworkModel.courseStatus isEqualToString:@"COMPLETE"]) {
-        self.tableView.tableFooterView = [UIView new];
+        self.bottomView.hidden = YES;
+        UIView *bottomView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, KPortraitWidth, 15)];
+        self.tableView.tableFooterView = bottomView;
     }
     else {
-        self.tableView.tableFooterView = self.bottomView;
+        CGFloat bottomHeight = [AccompanyDetailBottomView getViewHeight];
+        UIView *bottomView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, KPortraitWidth, bottomHeight)];
+        self.tableView.tableFooterView = bottomView;
+        
+        self.bottomView.hidden = NO;
         self.bottomView.actionButton.userInteractionEnabled = YES;
         [self.bottomView.actionButton setTitle:@"进入教室" forState:UIControlStateNormal];
         [self.bottomView.actionButton setBackgroundColor:THEMECOLOR];
@@ -160,8 +167,16 @@
     [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
         make.left.right.mas_equalTo(self.view);
         make.top.mas_equalTo(self.view.mas_top);
-        make.bottom.mas_equalTo(self.view.mas_bottom).offset(-iPhoneXSafeBottomMargin);
+        make.bottom.mas_equalTo(self.view.mas_bottom);
     }];
+    
+    CGFloat bottomHeight = [AccompanyDetailBottomView getViewHeight];
+    [self.view addSubview:self.bottomView];
+    [self.bottomView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.right.bottom.mas_equalTo(self.view);
+        make.height.mas_equalTo(bottomHeight);
+    }];
+    self.bottomView.hidden = YES;
 }
 
 - (void)evaluateWithStatusLabel:(UILabel *)statusLabel {
@@ -497,7 +512,6 @@
 - (AccompanyDetailBottomView *)bottomView {
     if (!_bottomView) {
         _bottomView = [AccompanyDetailBottomView shareInstance];
-        _bottomView.frame = CGRectMake(0, 0, kScreenWidth, 70);
         MJWeakSelf;
         [_bottomView sureAction:^{
             [weakSelf bottomButtonAction];
@@ -508,6 +522,7 @@
 - (UITableView *)tableView {
     if (!_tableView) {
         _tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
+        _tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
         _tableView.backgroundColor = [UIColor clearColor];
         _tableView.delegate = self;
         _tableView.dataSource = self;
@@ -522,8 +537,6 @@
         [_tableView registerNib:[UINib nibWithNibName:@"AccompanyArrangeCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"AccompanyArrangeCell"];
         [_tableView registerNib:[UINib nibWithNibName:@"AccompanyHomeworkCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"AccompanyHomeworkCell"];
         [_tableView registerNib:[UINib nibWithNibName:@"AccompanyRemarkCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"AccompanyRemarkCell"];
-        _tableView.tableFooterView = self.bottomView;
-        
     }
     return _tableView;
 }

+ 2 - 0
KulexiuForStudent/KulexiuForStudent/Module/Course/AccompanyCourse/View/AccompanyDetailBottomView.h

@@ -19,6 +19,8 @@ typedef void(^AccompanyButtonAction)(void);
 
 - (void)sureAction:(AccompanyButtonAction)callback;
 
++ (CGFloat)getViewHeight;
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 9 - 0
KulexiuForStudent/KulexiuForStudent/Module/Course/AccompanyCourse/View/AccompanyDetailBottomView.m

@@ -31,6 +31,15 @@
         self.callback();
     }
 }
+
++ (CGFloat)getViewHeight {
+    if (IS_iPhoneX) {
+        return 44 + 10 + iPhoneXSafeBottomMargin;
+    }
+    else {
+        return 44 + 10 + 20;
+    }
+}
 /*
 // Only override drawRect: if you perform custom drawing.
 // An empty implementation adversely affects performance during animation.

+ 4 - 4
KulexiuForStudent/KulexiuForStudent/Module/Course/AccompanyCourse/View/AccompanyDetailBottomView.xib

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22504"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -14,7 +14,7 @@
             <autoresizingMask key="autoresizingMask"/>
             <subviews>
                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="oRU-Dt-UTR">
-                    <rect key="frame" x="25" y="15" width="364" height="44"/>
+                    <rect key="frame" x="25" y="10" width="364" height="44"/>
                     <color key="backgroundColor" red="0.1764705882" green="0.78039215689999997" blue="0.66666666669999997" alpha="1" colorSpace="calibratedRGB"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="44" id="kXD-lh-kn0"/>
@@ -36,7 +36,7 @@
             <constraints>
                 <constraint firstItem="oRU-Dt-UTR" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="25" id="WJY-zy-oub"/>
                 <constraint firstItem="oRU-Dt-UTR" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="gJa-gF-SIm"/>
-                <constraint firstItem="oRU-Dt-UTR" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="15" id="neC-CL-OHA"/>
+                <constraint firstItem="oRU-Dt-UTR" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="10" id="neC-CL-OHA"/>
             </constraints>
             <nil key="simulatedTopBarMetrics"/>
             <nil key="simulatedBottomBarMetrics"/>

+ 19 - 9
KulexiuForStudent/KulexiuForStudent/Module/Course/MusicRoom/Controller/MusicRoomDetailViewController.m

@@ -12,7 +12,6 @@
 #import "AccompanyDetailBottomView.h"
 #import "HomeworkDetailModel.h"
 #import "EvaluateDetailModel.h"
-#import "AccompanyAlertView.h"
 #import "KSChatConversationViewController.h"
 #import "KSGroupConversationController.h"
 #import <WMPlayer.h>
@@ -35,8 +34,6 @@
 
 @property (nonatomic, strong) UITableView *tableView;
 
-@property (nonatomic, strong) AccompanyAlertView *alertView;
-
 @property (nonatomic, strong) NSMutableArray *fileArray;
 
 @property (nonatomic, strong) KSMediaManager *mediaManager;
@@ -125,10 +122,16 @@
         self.canModify = YES;
     }
     if ([self.homeworkModel.courseStatus isEqualToString:@"COMPLETE"]) {
-        self.tableView.tableFooterView = [UIView new];
+        self.bottomView.hidden = YES;
+        UIView *bottomView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, KPortraitWidth, 15)];
+        self.tableView.tableFooterView = bottomView;
     }
     else {
-        self.tableView.tableFooterView = self.bottomView;
+        CGFloat bottomHeight = [AccompanyDetailBottomView getViewHeight];
+        UIView *bottomView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, KPortraitWidth, bottomHeight)];
+        self.tableView.tableFooterView = bottomView;
+        
+        self.bottomView.hidden = NO;
         self.bottomView.actionButton.userInteractionEnabled = YES;
         [self.bottomView.actionButton setTitle:@"进入教室" forState:UIControlStateNormal];
         [self.bottomView.actionButton setBackgroundColor:THEMECOLOR];
@@ -142,8 +145,17 @@
     [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
         make.left.right.mas_equalTo(self.view);
         make.top.mas_equalTo(self.view.mas_top);
-        make.bottom.mas_equalTo(self.view.mas_bottom).offset(-iPhoneXSafeBottomMargin);
+        make.bottom.mas_equalTo(self.view.mas_bottom);
+    }];
+    
+    CGFloat bottomHeight = [AccompanyDetailBottomView getViewHeight];
+    
+    [self.view addSubview:self.bottomView];
+    [self.bottomView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.right.bottom.mas_equalTo(self.view);
+        make.height.mas_equalTo(bottomHeight);
     }];
+    self.bottomView.hidden = YES;
 }
 
 - (void)evaluateWithStatusLabel:(UILabel *)statusLabel {
@@ -422,7 +434,6 @@
 - (AccompanyDetailBottomView *)bottomView {
     if (!_bottomView) {
         _bottomView = [AccompanyDetailBottomView shareInstance];
-        _bottomView.frame = CGRectMake(0, 0, kScreenWidth, 70);
         MJWeakSelf;
         [_bottomView sureAction:^{
             [weakSelf bottomButtonAction];
@@ -433,6 +444,7 @@
 - (UITableView *)tableView {
     if (!_tableView) {
         _tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
+        _tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
         _tableView.backgroundColor = [UIColor clearColor];
         _tableView.delegate = self;
         _tableView.dataSource = self;
@@ -445,8 +457,6 @@
         [_tableView registerNib:[UINib nibWithNibName:@"AccompanyArrangeCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"AccompanyArrangeCell"];
         [_tableView registerNib:[UINib nibWithNibName:@"AccompanyHomeworkCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"AccompanyHomeworkCell"];
         [_tableView registerNib:[UINib nibWithNibName:@"AccompanyRemarkCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"AccompanyRemarkCell"];
-        _tableView.tableFooterView = self.bottomView;
-        
     }
     return _tableView;
 }

+ 20 - 6
KulexiuForStudent/KulexiuForStudent/Module/Course/VipCourse/Controller/VipCouseDetailViewController.m

@@ -124,16 +124,22 @@
     // 老师布置过作业且没有点评 可以点击
     if (self.homeworkModel.reviewHomework == 1 || self.homeworkModel.decorateHomework == 0) {
         self.canModify = NO;
-        
     }
     else {
         self.canModify = YES;
     }
+    
     if ([self.homeworkModel.courseStatus isEqualToString:@"COMPLETE"]) {
-        self.tableView.tableFooterView = [UIView new];
+        self.bottomView.hidden = YES;
+        UIView *bottomView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, KPortraitWidth, 15)];
+        self.tableView.tableFooterView = bottomView;
     }
     else {
-        self.tableView.tableFooterView = self.bottomView;
+        CGFloat bottomHeight = [AccompanyDetailBottomView getViewHeight];
+        UIView *bottomView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, KPortraitWidth, bottomHeight)];
+        self.tableView.tableFooterView = bottomView;
+        
+        self.bottomView.hidden = NO;
         self.bottomView.actionButton.userInteractionEnabled = YES;
         [self.bottomView.actionButton setTitle:@"进入教室" forState:UIControlStateNormal];
         [self.bottomView.actionButton setBackgroundColor:THEMECOLOR];
@@ -162,8 +168,17 @@
     [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
         make.left.right.mas_equalTo(self.view);
         make.top.mas_equalTo(self.view.mas_top);
-        make.bottom.mas_equalTo(self.view.mas_bottom).offset(-iPhoneXSafeBottomMargin);
+        make.bottom.mas_equalTo(self.view.mas_bottom);
+    }];
+    
+    CGFloat bottomHeight = [AccompanyDetailBottomView getViewHeight];
+    
+    [self.view addSubview:self.bottomView];
+    [self.bottomView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.right.bottom.mas_equalTo(self.view);
+        make.height.mas_equalTo(bottomHeight);
     }];
+    self.bottomView.hidden = YES;
 }
 
 - (void)evaluateWithStatusLabel:(UILabel *)statusLabel {
@@ -498,7 +513,6 @@
 - (AccompanyDetailBottomView *)bottomView {
     if (!_bottomView) {
         _bottomView = [AccompanyDetailBottomView shareInstance];
-        _bottomView.frame = CGRectMake(0, 0, kScreenWidth, 70);
         MJWeakSelf;
         [_bottomView sureAction:^{
             [weakSelf bottomButtonAction];
@@ -510,6 +524,7 @@
 - (UITableView *)tableView {
     if (!_tableView) {
         _tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
+        _tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
         _tableView.backgroundColor = [UIColor clearColor];
         _tableView.delegate = self;
         _tableView.dataSource = self;
@@ -524,7 +539,6 @@
         [_tableView registerNib:[UINib nibWithNibName:@"AccompanyArrangeCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"AccompanyArrangeCell"];
         [_tableView registerNib:[UINib nibWithNibName:@"AccompanyHomeworkCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"AccompanyHomeworkCell"];
         [_tableView registerNib:[UINib nibWithNibName:@"AccompanyRemarkCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"AccompanyRemarkCell"];
-        _tableView.tableFooterView = self.bottomView;
     }
     return _tableView;
 }

+ 20 - 1
KulexiuForStudent/KulexiuForStudent/Module/Home/ArrangeCourse/View/CourseDescAlertView.m

@@ -10,7 +10,9 @@
 #import "TYPageControl.h"
 #import "CourseDescAlertCell.h"
 
-@interface CourseDescAlertView ()<TYCyclePagerViewDataSource,TYCyclePagerViewDelegate>
+@interface CourseDescAlertView ()<TYCyclePagerViewDataSource,TYCyclePagerViewDelegate,UIGestureRecognizerDelegate>
+
+@property (weak, nonatomic) IBOutlet UIView *bgView;
 
 @property (weak, nonatomic) IBOutlet UIView *containerView;
 
@@ -42,6 +44,23 @@
         make.height.mas_equalTo(12);
         make.bottom.mas_equalTo(self.containerView.mas_bottom).offset(-24);
     }];
+    UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapAction:)];
+    tapGesture.delegate = self;
+    [self addGestureRecognizer:tapGesture];
+}
+
+- (void)tapAction:(UITapGestureRecognizer *)gesture {
+    if (self.callback) {
+        self.callback();
+    }
+    [self removeFromSuperview];
+}
+
+- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch {
+    if ([touch.view isDescendantOfView:self.bgView]) {
+        return NO;
+    }
+    return YES;
 }
 
 + (instancetype)sharedInstance {

+ 3 - 4
KulexiuForStudent/KulexiuForStudent/Module/Home/ArrangeCourse/View/CourseDescAlertView.xib

@@ -1,10 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina6_12" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
         <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
-        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -13,7 +12,7 @@
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
         <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="CourseDescAlertView">
             <rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
-            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+            <autoresizingMask key="autoresizingMask"/>
             <subviews>
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="azl-Ae-oTb">
                     <rect key="frame" x="46.666666666666657" y="174" width="300" height="504"/>
@@ -92,7 +91,6 @@
                     </userDefinedRuntimeAttributes>
                 </view>
             </subviews>
-            <viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
             <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
             <constraints>
                 <constraint firstItem="azl-Ae-oTb" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="QUM-nk-6Do"/>
@@ -102,6 +100,7 @@
             <nil key="simulatedBottomBarMetrics"/>
             <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
             <connections>
+                <outlet property="bgView" destination="azl-Ae-oTb" id="2kk-dZ-wGS"/>
                 <outlet property="containerView" destination="cqL-gu-egq" id="CoO-5Y-KgI"/>
             </connections>
             <point key="canvasLocation" x="23.664122137404579" y="19.718309859154932"/>

+ 3 - 2
KulexiuForStudent/KulexiuForStudent/Module/Login/Controller/InstrumentChooseViewController.m

@@ -57,10 +57,11 @@
 - (void)configUI {
     [self.scrollView removeFromSuperview];
     [self.view addSubview:self.bottomView];
+    CGFloat bottomHeight = [InstrumentChooseBottonView getViewHeight];
     [self.bottomView mas_makeConstraints:^(MASConstraintMaker *make) {
         make.left.right.mas_equalTo(self.view);
-        make.bottom.mas_equalTo(self.view.mas_bottom).offset(-iPhoneXSafeBottomMargin);
-        make.height.mas_equalTo(90);
+        make.bottom.mas_equalTo(self.view.mas_bottom);
+        make.height.mas_equalTo(bottomHeight);
     }];
     
     UIView *headView = [[UIView alloc] init];

+ 2 - 0
KulexiuForStudent/KulexiuForStudent/Module/Login/View/InstrumentChooseBottonView.h

@@ -18,6 +18,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 - (void)sureCallback:(InstrumentChooseCallback)callback;
 
++ (CGFloat)getViewHeight;
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 4 - 4
KulexiuForStudent/KulexiuForStudent/Module/Login/View/InstrumentChooseBottonView.xib

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21507" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -14,7 +14,7 @@
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <subviews>
                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Uf1-mj-TtD">
-                    <rect key="frame" x="28" y="10" width="358" height="44"/>
+                    <rect key="frame" x="28" y="30" width="358" height="44"/>
                     <color key="backgroundColor" red="0.1764705882" green="0.78039215689999997" blue="0.66666666669999997" alpha="1" colorSpace="calibratedRGB"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="44" id="d5b-G6-Zxi"/>
@@ -34,7 +34,7 @@
             <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
             <constraints>
                 <constraint firstItem="Uf1-mj-TtD" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="28" id="2ev-7D-ncM"/>
-                <constraint firstItem="Uf1-mj-TtD" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="10" id="XfO-IP-zIf"/>
+                <constraint firstItem="Uf1-mj-TtD" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="30" id="XfO-IP-zIf"/>
                 <constraint firstAttribute="trailing" secondItem="Uf1-mj-TtD" secondAttribute="trailing" constant="28" id="d7h-AJ-pUx"/>
             </constraints>
             <nil key="simulatedTopBarMetrics"/>

+ 3 - 3
KulexiuForStudent/KulexiuForStudent/Module/Mine/Homework/Controller/HomeworkDetailViewController.m

@@ -6,7 +6,6 @@
 //
 
 #import "HomeworkDetailViewController.h"
-#import "AccompanyAlertView.h"
 #import "HomeworkDetailModel.h"
 #import <WMPlayer.h>
 #import "AccompanyCourseInfoCell.h"
@@ -30,8 +29,6 @@
 
 @property (nonatomic, assign) NSInteger cellCount;
 
-@property (nonatomic, strong) AccompanyAlertView *alertView;
-
 @property (nonatomic, strong) HomeworkDetailModel *detailModel;
 
 @property (nonatomic, strong) NSMutableArray *fileArray;
@@ -119,17 +116,20 @@
     }
     // 老师布置过作业且没有点评 可以点击
     if (self.detailModel.reviewHomework == 1 || self.detailModel.decorateHomework == 0) {
+        self.bottomView.hidden = YES;
         self.canModify = NO;
         self.bottomView.sureButton.userInteractionEnabled = NO;
         self.bottomView.sureButton.backgroundColor = HexRGB(0xe5e5e5);
         [self.bottomView.sureButton setTitleColor:HexRGB(0x666666) forState:UIControlStateNormal];
     }
     else {
+        self.bottomView.hidden = NO;
         self.canModify = YES;
         self.bottomView.sureButton.userInteractionEnabled = YES;
         self.bottomView.sureButton.backgroundColor = THEMECOLOR;
         [self.bottomView.sureButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
     }
+    
     [self setupUI];
     [self.tableView reloadData];
 }

+ 5 - 0
KulexiuForStudent/KulexiuForStudent/Module/Mine/Homework/View/AccompanyAlertView.m

@@ -35,8 +35,13 @@
     view.frame = CGRectMake(0, 0, kScreen_Width, kScreen_Height);
     return view;
 }
+
+- (void)configDefaltStar {
+    self.starView.rate = 5;
+}
 - (void)showInView:(UIView *)displayView showStarView:(BOOL)showStarView {
     if (showStarView) {
+        [self configDefaltStar];
         self.starView.hidden = NO;
     }
     [displayView addSubview:self];