소스 검색

1.修改心跳动画

wenweiwei 3 년 전
부모
커밋
6cc3580006
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      BFCommonKit/Classes/BFCategorys/BFUIView+Ext.swift

+ 2 - 2
BFCommonKit/Classes/BFCategorys/BFUIView+Ext.swift

@@ -127,10 +127,10 @@ public extension UIView {
 
     /// 活动心跳动画
     /// - Returns: <#description#>
-    func activityHeartbeatAnimate() {
+    func activityHeartbeatAnimate(scaleX:CGFloat = 0.9,scaleY:CGFloat = 0.9) {
         layer.removeAllAnimations()
         UIView.animateKeyframes(withDuration: 0.45, delay: 0, options: .allowUserInteraction, animations: {
-            self.transform = CGAffineTransform(scaleX: 0.9, y: 0.9)
+            self.transform = CGAffineTransform(scaleX: scaleX, y: scaleY)
         }) { _ in
             UIView.animateKeyframes(withDuration: 0.45, delay: 0, options: .allowUserInteraction, animations: {
                 self.transform = .identity