Skip to content

Commit

Permalink
move to CADisplayLink as suggested
Browse files Browse the repository at this point in the history
  • Loading branch information
cowboyrushforth committed Oct 5, 2015
1 parent a629203 commit af3ec88
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Pod/Classes/LiquidLoadEffect.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class LiquidLoadEffect : NSObject {
var moveCircle: LiquittableCircle?
var shadowCircle: LiquittableCircle?

var timer: NSTimer?
var timer: CADisplayLink?

weak var loader: LiquidLoader!

Expand Down Expand Up @@ -65,7 +65,8 @@ class LiquidLoadEffect : NSObject {
}
resize()

timer = NSTimer.scheduledTimerWithTimeInterval(0.02, target: self, selector: Selector("update"), userInfo: nil, repeats: true)
timer = CADisplayLink(target: self, selector: "update")
timer?.addToRunLoop(NSRunLoop.mainRunLoop(), forMode: NSRunLoopCommonModes)
}

func updateKeyframe(key: CGFloat) {
Expand Down

0 comments on commit af3ec88

Please sign in to comment.