Browse Source

声部选择bug修复

Steven 3 months ago
parent
commit
7916a9584c

+ 1 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/CreateStyle/Controller/InstrumentChooseViewController.h

@@ -13,6 +13,7 @@ typedef void(^ChooseInstrumentCallback)(NSMutableArray * _Nullable chooseArray);
 NS_ASSUME_NONNULL_BEGIN
 
 @interface InstrumentChooseViewController : KSBaseViewController
+
 // 是否单选
 @property (nonatomic, assign) BOOL isSingleChoose;
 

+ 6 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/CreateStyle/Controller/InstrumentChooseViewController.m

@@ -190,7 +190,13 @@
 
 - (void)countMessageWithModel:(InstrumentMessageModel *)model indexPath:(NSIndexPath *)indexPath {
     if (self.isSingleChoose) { // 单选
+        
         if (model.isChoose) {
+            // 取消上一个选中
+            if (self.chooseModel) {
+                self.chooseModel.isChoose = NO;
+                [self.collectionView reloadItemsAtIndexPaths:@[indexPath,self.chooseIndexPath]];
+            }
             self.chooseModel = model;
             self.chooseIndexPath = indexPath;
         }

+ 5 - 5
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/View/TenantMineHeadView.xib

@@ -35,7 +35,7 @@
                             </userDefinedRuntimeAttributes>
                         </imageView>
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="vFq-5f-Squ">
-                            <rect key="frame" x="87" y="47" width="10" height="18"/>
+                            <rect key="frame" x="87" y="45" width="10" height="18"/>
                             <subviews>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Fa1-iw-aks">
                                     <rect key="frame" x="5" y="0.0" width="0.0" height="18"/>
@@ -65,7 +65,7 @@
                             </userDefinedRuntimeAttributes>
                         </view>
                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="J7V-BY-Z3E">
-                            <rect key="frame" x="89" y="13" width="0.0" height="24"/>
+                            <rect key="frame" x="89" y="11" width="0.0" height="24"/>
                             <constraints>
                                 <constraint firstAttribute="height" constant="24" id="N8P-XB-sBW"/>
                             </constraints>
@@ -81,14 +81,14 @@
                             </connections>
                         </button>
                         <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="QHb-w1-1yi">
-                            <rect key="frame" x="98" y="17" width="39" height="16"/>
+                            <rect key="frame" x="98" y="15" width="39" height="16"/>
                             <constraints>
                                 <constraint firstAttribute="width" constant="39" id="dmt-FK-O3O"/>
                                 <constraint firstAttribute="height" constant="16" id="oKJ-9H-jHo"/>
                             </constraints>
                         </imageView>
                         <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Pf0-fO-g6q">
-                            <rect key="frame" x="143" y="17" width="39" height="16"/>
+                            <rect key="frame" x="143" y="15" width="39" height="16"/>
                             <constraints>
                                 <constraint firstAttribute="width" constant="39" id="0jU-Yr-iab"/>
                                 <constraint firstAttribute="height" constant="16" id="WMh-DL-Rcf"/>
@@ -106,7 +106,7 @@
                     <gestureRecognizers/>
                     <constraints>
                         <constraint firstItem="MUG-JJ-qQX" firstAttribute="leading" secondItem="6w5-En-SDh" secondAttribute="leading" constant="15" id="1SG-mb-u5B"/>
-                        <constraint firstItem="J7V-BY-Z3E" firstAttribute="top" secondItem="MUG-JJ-qQX" secondAttribute="top" constant="8" id="8dW-9H-ZGe"/>
+                        <constraint firstItem="J7V-BY-Z3E" firstAttribute="top" secondItem="MUG-JJ-qQX" secondAttribute="top" constant="6" id="8dW-9H-ZGe"/>
                         <constraint firstItem="Pf0-fO-g6q" firstAttribute="centerY" secondItem="J7V-BY-Z3E" secondAttribute="centerY" id="EEO-69-wM2"/>
                         <constraint firstItem="7ie-6w-nwS" firstAttribute="top" secondItem="MUG-JJ-qQX" secondAttribute="top" id="IdQ-33-FFt"/>
                         <constraint firstItem="vFq-5f-Squ" firstAttribute="top" secondItem="J7V-BY-Z3E" secondAttribute="bottom" constant="10" id="JBn-7m-3Mk"/>