浏览代码

修改约束警告

Steven 4 月之前
父节点
当前提交
a223dd8ece

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Controller/HomeViewController.m

@@ -1262,7 +1262,7 @@
 - (UICollectionView *)albumCollectionView {
     if (!_albumCollectionView) {
         UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
-        layout.sectionInset = UIEdgeInsetsMake(12, 11, 12, 14);
+        layout.sectionInset = UIEdgeInsetsMake(0, 14, 0, 14);
         layout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
         _albumCollectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
         _albumCollectionView.backgroundColor = [UIColor clearColor];

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeBannerView.xib

@@ -14,7 +14,7 @@
             <autoresizingMask key="autoresizingMask"/>
             <subviews>
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="TxO-MH-UVa">
-                    <rect key="frame" x="0.0" y="0.0" width="414" height="173"/>
+                    <rect key="frame" x="0.0" y="0.0" width="414" height="185"/>
                     <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                 </view>
             </subviews>
@@ -22,7 +22,7 @@
             <constraints>
                 <constraint firstAttribute="trailing" secondItem="TxO-MH-UVa" secondAttribute="trailing" id="0r3-Rk-6nL"/>
                 <constraint firstItem="TxO-MH-UVa" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="BF3-AJ-S65"/>
-                <constraint firstAttribute="bottom" secondItem="TxO-MH-UVa" secondAttribute="bottom" constant="12" id="FoY-Yd-bSd"/>
+                <constraint firstAttribute="bottom" secondItem="TxO-MH-UVa" secondAttribute="bottom" id="FoY-Yd-bSd"/>
                 <constraint firstItem="TxO-MH-UVa" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="zwG-j0-akh"/>
             </constraints>
             <nil key="simulatedTopBarMetrics"/>

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeButtonView.xib

@@ -14,14 +14,14 @@
             <autoresizingMask key="autoresizingMask"/>
             <subviews>
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FDF-ZT-TJx">
-                    <rect key="frame" x="0.0" y="0.0" width="414" height="98"/>
+                    <rect key="frame" x="0.0" y="0.0" width="414" height="118"/>
                     <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                 </view>
             </subviews>
             <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
             <constraints>
                 <constraint firstItem="FDF-ZT-TJx" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="D3O-sT-Grz"/>
-                <constraint firstAttribute="bottom" secondItem="FDF-ZT-TJx" secondAttribute="bottom" constant="20" id="N4E-bP-VUJ"/>
+                <constraint firstAttribute="bottom" secondItem="FDF-ZT-TJx" secondAttribute="bottom" id="N4E-bP-VUJ"/>
                 <constraint firstItem="FDF-ZT-TJx" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="WkT-zx-U1t"/>
                 <constraint firstAttribute="trailing" secondItem="FDF-ZT-TJx" secondAttribute="trailing" id="vJG-sS-Gpn"/>
             </constraints>

+ 5 - 33
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/View/MineHeadView.m

@@ -57,39 +57,11 @@
     
     [self.viperImage setImage:[UIImage imageNamed:viperImage]];
     
-    BOOL hasDegreeAuth = infoMessage.degreeFlag;
-    BOOL hasTeacherAuth = infoMessage.teacherFlag;
-    // 学历标识去掉
-//    if (hasDegreeAuth && hasTeacherAuth) {
-//        [self.firstImage setImage:[UIImage imageNamed:@"education_icon"]];
-//        self.firstImage.hidden = NO;
-//        self.firstImageWidth.constant = 39.0f;
-//        [self.secondImage setImage:[UIImage imageNamed:@"qualification_icon"]];
-//        self.secondImage.hidden = NO;
-//        self.secondImageWidth.constant = 39.0f;
-//    }
-//    else {
-//        if (hasDegreeAuth) {
-//            [self.firstImage setImage:[UIImage imageNamed:@"education_icon"]];
-//            self.firstImage.hidden = NO;
-//            self.firstImageWidth.constant = 39.0f;
-//            self.secondImage.hidden = YES;
-//            self.secondImageWidth.constant = 0.0f;
-//        }
-//        else if (hasTeacherAuth) {
-//            [self.firstImage setImage:[UIImage imageNamed:@"qualification_icon"]];
-//            self.firstImage.hidden = NO;
-//            self.firstImageWidth.constant = 39.0f;
-//            self.secondImage.hidden = YES;
-//            self.secondImageWidth.constant = 0.0f;
-//        }
-//        else {
-            self.firstImage.hidden = YES;
-            self.firstImageWidth.constant = 0.0f;
-            self.secondImage.hidden = YES;
-            self.secondImageWidth.constant = 0.0f;
-//        }
-//    }
+    self.firstImage.hidden = YES;
+    self.firstImageWidth.constant = 0.0f;
+    self.secondImage.hidden = YES;
+    self.secondImageWidth.constant = 0.0f;
+
     
     if (![NSString isEmptyString:infoMessage.heardUrl]) {
         [self.userAvatal displayImageWithUrl:[NSURL URLWithString:[infoMessage.heardUrl getUrlEndcodeString]] placeholder:self.preDisplayImage defaultImage:[UIImage imageNamed:TEACHER_AVATAR] callback:^(UIImage * _Nonnull image) {