Skip to content

Commit

Permalink
Fix default values
Browse files Browse the repository at this point in the history
  • Loading branch information
MortimerGoro committed Jul 22, 2015
1 parent 2c41b3a commit eb803c9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.5.1

- Fix default animation values

## 1.5.0

- Feature: Add predefined and configurable easing functions to the API. Swipe animations are now splitted into different settings so you can now use different animations (easing function, duration, etc) for each kind of animations: show swipe, hide swipe, stretch cell from already swiped buttons and more.
Expand Down
2 changes: 1 addition & 1 deletion MGSwipeTableCell.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'MGSwipeTableCell'
s.version = '1.5.0'
s.version = '1.5.1'
s.author = { 'Imanol Fernandez' => '[email protected]' }
s.homepage = 'https://github.com/MortimerGoro/MGSwipeTableCell'
s.summary = 'An easy to use UITableViewCell subclass that allows to display swipeable buttons with a variety of transitions'
Expand Down
12 changes: 1 addition & 11 deletions MGSwipeTableCell/MGSwipeTableCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -484,20 +484,11 @@ static inline CGFloat mgEaseInOutBounce(CGFloat t, CGFloat b, CGFloat c) {
return mgEaseOutBounce (1.0 - t*2, 0, c) * .5 + c*.5 + b;
};

static inline CGFloat mgEaseOutElastic(CGFloat t, CGFloat b, CGFloat c) {
CGFloat s=1.70158;CGFloat p=0;CGFloat a=c; CGFloat d = 0.6;
if (t==0) return b; if (t==1) return b+c; if (!p) p=d*.3;
if (a < fabs(c)) { a=c; s=p/4; }
else s = p/(2*M_PI) * asin(c/a);
return a*pow(2,-10*t) * sin( (t*d-s)*(2*M_PI)/p ) + c + b;
}


@implementation MGSwipeAnimation

-(instancetype) init {
if (self = [super init]) {
_duration = 0.6;
_duration = 0.3;
_easingFunction = MGSwipeEasingFunctionCubicOut;
}
return self;
Expand All @@ -523,7 +514,6 @@ -(CGFloat) value:(CGFloat)elapsed duration:(CGFloat)duration from:(CGFloat)from
case MGSwipeEasingFunctionBounceOut: easingFunction = mgEaseOutBounce;break;
case MGSwipeEasingFunctionBounceInOut: easingFunction = mgEaseInOutBounce;break;
}
easingFunction = mgEaseOutBounce;
return (*easingFunction)(t, from, to - from);
}

Expand Down

0 comments on commit eb803c9

Please sign in to comment.