Skip to content

Commit

Permalink
Update Swift demo to be compatible with Swift 3
Browse files Browse the repository at this point in the history
  • Loading branch information
antonio081014 committed Sep 30, 2016
1 parent 183e2b7 commit e6a82ff
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 384 deletions.
20 changes: 10 additions & 10 deletions Pod/SPWaterProgressIndicatorView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -115,46 +115,46 @@ class SPWaterProgressIndicatorView: UIView {
*
* Default: 3.0f
*/
private var primaryWaveLineWidth: CGFloat
fileprivate var primaryWaveLineWidth: CGFloat

/**
* The amplitude that is used when the incoming amplitude is near zero.
* Setting a value greater 0 provides a more vivid visualization.
*
* Default: 0.01
*/
private var idleAmplitude: CGFloat
fileprivate var idleAmplitude: CGFloat

/**
* The frequency of the sinus wave. The higher the value, the more sinus wave peaks you will have.
*
* Default: 1.5
*/
private var frequency: CGFloat
fileprivate var frequency: CGFloat

/**
* The current amplitude
*/
private var amplitude: CGFloat
fileprivate var amplitude: CGFloat

/**
* The lines are joined stepwise, the more dense you draw, the more CPU power is used.
*
* Default: 5
*/
private var density: CGFloat
fileprivate var density: CGFloat

/**
* The phase shift that will be applied with each level setting
* Change this to modify the animation speed or direction
*
* Default: -0.15
*/
private var phaseShift: CGFloat
private var phase: CGFloat
fileprivate var phaseShift: CGFloat
fileprivate var phase: CGFloat

private var displaylink: CADisplayLink?
private lazy var textLayer: CATextLayer = {
fileprivate var displaylink: CADisplayLink?
fileprivate lazy var textLayer: CATextLayer = {
let textlayer = CATextLayer.init()
textlayer.bounds = CGRect(x: 0, y: 0, width: self.bounds.width, height: min(self.bounds.height, 40.0))
textlayer.position = self.center
Expand All @@ -172,7 +172,7 @@ class SPWaterProgressIndicatorView: UIView {
/**
* With phase shifts, the animation will prevail.
*/
private func update() {
fileprivate func update() {
self.phase += self.phaseShift
self.setNeedsDisplay()
}
Expand Down
Loading

0 comments on commit e6a82ff

Please sign in to comment.