Skip to content

Commit

Permalink
Merge pull request #12 from parleer/master
Browse files Browse the repository at this point in the history
Removed early exit from setSelectedIndex because the user may be in t…
  • Loading branch information
gontovnik committed Dec 2, 2015
2 parents d1af559 + 726793f commit e7e1ba0
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions DGRunkeeperSwitch/DGRunkeeperSwitch.swift
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,6 @@ public class DGRunkeeperSwitch: UIControl {
}

public func setSelectedIndex(selectedIndex: Int, animated: Bool) {
if self.selectedIndex == selectedIndex {
return
}

self.selectedIndex = selectedIndex
if animated {
UIView.animateWithDuration(animationDuration, delay: 0.0, usingSpringWithDamping: animationSpringDamping, initialSpringVelocity: animationInitialSpringVelocity, options: [UIViewAnimationOptions.BeginFromCurrentState, UIViewAnimationOptions.CurveEaseOut], animations: { () -> Void in
Expand Down

0 comments on commit e7e1ba0

Please sign in to comment.