Browse Source

1.隐藏公告气泡动效

Steven 2 days ago
parent
commit
f6be53b5f4

+ 8 - 1
KulexiuForStudent/KulexiuForStudent/Common/Base/AlertView/KSTipsAlert.m

@@ -10,6 +10,7 @@
 #import <KSToolLibrary/UIView+Animation.h>
 
 @interface KSTipsAlert ()
+@property (weak, nonatomic) IBOutlet UIView *tipsIcon;
 
 @property (weak, nonatomic) IBOutlet UILabel *topTitle;
 
@@ -24,7 +25,13 @@
 @end
 
 @implementation KSTipsAlert
-
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    self.tipsIcon.backgroundColor = CLIENT_THEMECOLOR;
+    self.cancleButton.layer.borderColor = CLIENT_THEMECOLOR.CGColor;
+    [self.cancleButton setTitleColor:CLIENT_THEMECOLOR forState:UIControlStateNormal];
+    [self.sureButton setBackgroundColor:CLIENT_THEMECOLOR];
+}
 
 + (instancetype)shareInstanceWithTitle:(NSString *)title descMessage:(NSString *)descMessage leftTitle:(NSString *)leftTitle rightTitle:(NSString *)rightTitle callback:(TipsAlertCallback)callback {
     KSTipsAlert *alertView = [[[NSBundle mainBundle] loadNibNamed:@"KSTipsAlert" owner:nil options:nil] firstObject];

+ 6 - 5
KulexiuForStudent/KulexiuForStudent/Common/Base/AlertView/KSTipsAlert.xib

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23094" 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="20020"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23084"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -27,7 +27,7 @@
                         </label>
                         <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="x2J-5B-1Wq">
                             <rect key="frame" x="162.5" y="125.5" width="144.5" height="44"/>
-                            <color key="backgroundColor" red="0.1764705882" green="0.78039215689999997" blue="0.66666666669999997" alpha="1" colorSpace="calibratedRGB"/>
+                            <color key="backgroundColor" red="0.1764705882352941" green="0.7803921568627451" blue="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                             <fontDescription key="fontDescription" type="system" pointSize="16"/>
                             <state key="normal" title="确定">
                                 <color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@@ -48,7 +48,7 @@
                             </constraints>
                             <fontDescription key="fontDescription" type="system" pointSize="16"/>
                             <state key="normal" title="取消">
-                                <color key="titleColor" red="0.0039215686274509803" green="0.75686274509803919" blue="0.70980392156862748" alpha="1" colorSpace="calibratedRGB"/>
+                                <color key="titleColor" red="0.1764705882352941" green="0.7803921568627451" blue="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                             </state>
                             <userDefinedRuntimeAttributes>
                                 <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
@@ -75,7 +75,7 @@
                         </label>
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="I5d-vy-DYW">
                             <rect key="frame" x="18" y="24" width="4" height="18"/>
-                            <color key="backgroundColor" red="0.0039215686274509803" green="0.75686274509803919" blue="0.70980392156862748" alpha="1" colorSpace="calibratedRGB"/>
+                            <color key="backgroundColor" red="0.1764705882352941" green="0.7803921568627451" blue="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                             <constraints>
                                 <constraint firstAttribute="width" constant="4" id="9KX-ZB-vT4"/>
                                 <constraint firstAttribute="height" constant="18" id="aa3-26-Svy"/>
@@ -139,6 +139,7 @@
                 <outlet property="cancleButton" destination="7Kd-Un-rMd" id="qld-xO-Wyt"/>
                 <outlet property="descLabel" destination="YM9-iV-JM6" id="cNG-pv-wEx"/>
                 <outlet property="sureButton" destination="x2J-5B-1Wq" id="W7p-JL-Ic5"/>
+                <outlet property="tipsIcon" destination="I5d-vy-DYW" id="AjA-Za-wL6"/>
                 <outlet property="topTitle" destination="fjg-28-kfA" id="lCJ-jh-xeg"/>
             </connections>
             <point key="canvasLocation" x="69.565217391304358" y="94.754464285714278"/>

+ 6 - 6
KulexiuForStudent/KulexiuForStudent/Module/Chat/Controller/KSChatConversationViewController.m

@@ -6,14 +6,14 @@
 //
 
 #import "KSChatConversationViewController.h"
-#import "KSPublicAlertView.h"
+#import "KSTipsAlert.h"
 
 
 @interface KSChatConversationViewController ()
 
 @property (nonatomic, strong) KSTXC2CChatViewController *vc;
 
-@property (nonatomic, strong) KSPublicAlertView *alertView;
+@property (nonatomic, strong) KSTipsAlert *alertView;
 
 @end
 
@@ -71,10 +71,10 @@
             BOOL isDelUser = [userDic ks_boolValueForKey:@"delFlag"];
             if (isDelUser) {
                 MJWeakSelf;
-                self.alertView = [KSPublicAlertView shareInstanceWithTitle:@"提示" descMessage:@"该用户已注销,是否删除会话?" leftTitle:@"否" rightTitle:@"是" cancelAction:^{
-
-                } sureAction:^{
-                    [weakSelf removeCurrentConversation];
+                self.alertView = [KSTipsAlert shareInstanceWithTitle:@"提示" descMessage:@"该用户已注销,是否删除会话?" leftTitle:@"取消" rightTitle:@"确认" callback:^(BOOL isSure) {
+                    if (isSure) {
+                        [weakSelf removeCurrentConversation];
+                    }
                 }];
             }
         }

+ 7 - 7
KulexiuForStudent/KulexiuForStudent/Module/Chat/Controller/KSGroupConversationController.m

@@ -7,13 +7,13 @@
 
 #import "KSGroupConversationController.h"
 #import "GroupSettingViewController.h"
-#import "KSPublicAlertView.h"
+#import "KSTipsAlert.h"
 
 @interface KSGroupConversationController ()
 
 @property (nonatomic, strong) KSTXGroupChatViewController *vc;
 
-@property (nonatomic, strong) KSPublicAlertView *alertView;
+@property (nonatomic, strong) KSTipsAlert *alertView;
 
 @end
 
@@ -78,13 +78,13 @@
         }
         else {
             [self allocTitle:self.conversation.groupID];
-             if ([dic ks_integerValueForKey:@"code"] == 204) {
+            if ([dic ks_integerValueForKey:@"code"] == 204) {
                 // 弹窗提示是否删除群组
                 MJWeakSelf;
-                self.alertView = [KSPublicAlertView shareInstanceWithTitle:@"提示" descMessage:MESSAGEKEY leftTitle:@"取消" rightTitle:@"确定" cancelAction:^{
-                    
-                } sureAction:^{
-                    [weakSelf removeCurrentConversation];
+                self.alertView = [KSTipsAlert shareInstanceWithTitle:@"提示" descMessage:MESSAGEKEY leftTitle:@"取消" rightTitle:@"确定" callback:^(BOOL isSure) {
+                    if (isSure) {
+                        [weakSelf removeCurrentConversation];
+                    }
                 }];
             }
         }

+ 19 - 19
KulexiuForStudent/Pods/TIMCommon/TIMCommon/BaseCell/TUIMessageCell.m

@@ -374,25 +374,25 @@
 
 - (void)highlightWhenMatchKeyword:(NSString *)keyword {
     static NSString *const key = @"highlightAnimation";
-    if (keyword && keyword.length) {
-        if (self.highlightAnimating) {
-            return;
-        }
-        self.highlightAnimating = YES;
-        CAKeyframeAnimation *animation = [CAKeyframeAnimation animationWithKeyPath:@"backgroundColor"];
-        animation.repeatCount = 3;
-        animation.values = @[
-            (id)[[UIColor orangeColor] colorWithAlphaComponent:0.2].CGColor,
-            (id)[[UIColor orangeColor] colorWithAlphaComponent:0.5].CGColor,
-            (id)[[UIColor orangeColor] colorWithAlphaComponent:0.2].CGColor,
-        ];
-        animation.duration = 0.5;
-        animation.removedOnCompletion = YES;
-        animation.delegate = self;
-        [self.highlightAnimateView.layer addAnimation:animation forKey:key];
-    } else {
-        [self.highlightAnimateView.layer removeAnimationForKey:key];
-    }
+//    if (keyword && keyword.length) {
+//        if (self.highlightAnimating) {
+//            return;
+//        }
+//        self.highlightAnimating = YES;
+//        CAKeyframeAnimation *animation = [CAKeyframeAnimation animationWithKeyPath:@"backgroundColor"];
+//        animation.repeatCount = 3;
+//        animation.values = @[
+//            (id)[[UIColor orangeColor] colorWithAlphaComponent:0.2].CGColor,
+//            (id)[[UIColor orangeColor] colorWithAlphaComponent:0.5].CGColor,
+//            (id)[[UIColor orangeColor] colorWithAlphaComponent:0.2].CGColor,
+//        ];
+//        animation.duration = 0.5;
+//        animation.removedOnCompletion = YES;
+//        animation.delegate = self;
+//        [self.highlightAnimateView.layer addAnimation:animation forKey:key];
+//    } else {
+//        [self.highlightAnimateView.layer removeAnimationForKey:key];
+//    }
 }
 
 - (void)updateReadLabelText {