WWRippleEffect 0.1.0

WWRippleEffect 0.1.0

Maintained by William-Weng.



  • By
  • 翁禹斌(William.Weng)

WWRippleEffect

WWRippleEffect - 一個簡單的點擊波紋效果

Swift 4.0 Version Platform License

一個簡單的點擊波紋效果 (上傳至Cocoapods)

使用範例

IBOutlet

import UIKit
import WWRippleEffect

class ViewController: UIViewController {
    
    override func viewDidLoad() {
        super.viewDidLoad()
    }
    
    override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
        WWRippleEffect.touch(touches: touches, viewController: self, duration: 2.0, lineWidth: 1.0, color: .blue, scale: 5.0, rippleSize: 32.0)
    }
    
    @IBAction func rippleShowed(_ sender: UIButton) {
        WWRippleEffect.click(for: sender, duration: 2.0, lineWidth: 1.0, color: .red, scale: 5.0)
    }
}