瀏覽代碼

防止多次点击

jsonwang 3 年之前
父節點
當前提交
c7f78ac0c8

+ 3 - 0
MusicVideoPlus/AppDelegate.swift

@@ -13,6 +13,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
 
     func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
         window = UIWindow(frame: UIScreen.main.bounds)
+        
+        //交换方法
+        UIButton.methodExchange()
 
         let rootViewController = MVHomeController()
         let navigationController = UINavigationController(rootViewController: rootViewController)

+ 1 - 1
MusicVideoPlus/Classes/Modules/Home/Views/MVBannerCell.swift

@@ -104,7 +104,7 @@ class MVBannerCell: UICollectionViewCell {
         reCreateBtn.setImage(UIImage(named: "reCreate"), for: .normal)
         reCreateBtn.addTarget(self, action: #selector(btnClick(sender:)), for: .touchUpInside)
         reCreateBtn.backgroundColor = UIColor(red: 61.0 / 255.0, green: 193.0 / 255.0, blue: 193.0 / 255.0, alpha: 1)
-
+        reCreateBtn.eventInterval = 0.5
         return reCreateBtn
     }()
 

+ 1 - 0
MusicVideoPlus/Classes/Modules/Mine/Views/MVPlayControlViewCell.swift

@@ -107,6 +107,7 @@ class MVPlayControlViewCell: UICollectionViewCell {
         reCreateBtn.tag = 3
         reCreateBtn.addTarget(self, action: #selector(btnClick(sender:)), for: .touchUpInside)
         reCreateBtn.backgroundColor = UIColor(red: 61.0 / 255.0, green: 193.0 / 255.0, blue: 193.0 / 255.0, alpha: 1)
+        reCreateBtn.eventInterval = 0.5
         return reCreateBtn
     }()