Browse Source

1.处理pad OS 18系统tabbar 显示问题
2.处理textview 设置行高在拼音输入时异常

Steven 1 day ago
parent
commit
a3ead23ff9

+ 7 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/Base/TabbarController/KSTabBarViewController.m

@@ -66,6 +66,13 @@
     }
     [UITabBar appearance].backgroundColor = UIColor.whiteColor;
     self.tabBar.translucent = NO;
+    // 处理 pad上 tabbar样式
+    if (@available(iOS 18.0, *)) {
+        if (UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPad)
+        {
+            self.traitOverrides.horizontalSizeClass = UIUserInterfaceSizeClassCompact; //TAB BAR ON BOTTOM
+        }
+    }
 }
 
 - (void)removeControllerNotifer {

+ 5 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/GroupNotice/View/NoticeEditBodyView.m

@@ -128,6 +128,11 @@
 }
 
 - (void)updateTextViewLineHeight:(UITextView *)textView {
+    UITextRange *markedTextRange = textView.markedTextRange;
+    if (markedTextRange) {
+        // 当前处于拼音输入状态,暂不更新 attributedText
+        return;
+    }
     NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
     paragraphStyle.lineSpacing = 4.0f;
     UIFont *font = [UIFont systemFontOfSize:15 weight:UIFontWeightRegular];