Skip to content

Commit

Permalink
Fix #39
Browse files Browse the repository at this point in the history
  • Loading branch information
andreamazz committed May 28, 2015
1 parent fb122be commit cf92298
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions AMPopTip/AMPopTip.m
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ - (void)floatAnimation {
break;
}

[UIView animateWithDuration:(self.actionAnimationIn / 2) delay:self.actionDelayIn options:(UIViewAnimationOptionRepeat | UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionCurveEaseInOut | UIViewAnimationOptionAutoreverse) animations:^{
[UIView animateWithDuration:(self.actionAnimationIn / 2) delay:self.actionDelayIn options:(UIViewAnimationOptionRepeat | UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionCurveEaseInOut | UIViewAnimationOptionAutoreverse | UIViewAnimationOptionAllowUserInteraction) animations:^{
self.transform = CGAffineTransformMakeTranslation(xOffset, yOffset);
} completion:nil];
}
Expand All @@ -588,7 +588,7 @@ - (void)bounceAnimation {
break;
}

[UIView animateWithDuration:(self.actionAnimationIn / 10) delay:self.actionDelayIn options:(UIViewAnimationOptionCurveEaseIn) animations:^{
[UIView animateWithDuration:(self.actionAnimationIn / 10) delay:self.actionDelayIn options:(UIViewAnimationOptionCurveEaseIn | UIViewAnimationOptionAllowUserInteraction) animations:^{
self.transform = CGAffineTransformMakeTranslation(xOffset, yOffset);
} completion:^(BOOL finished) {
[UIView animateWithDuration:(self.actionAnimationIn - self.actionAnimationIn / 10) delay:0 usingSpringWithDamping:0.4 initialSpringVelocity:1 options:0 animations:^{
Expand All @@ -602,7 +602,7 @@ - (void)bounceAnimation {
}

- (void)pulseAnimation {
[UIView animateWithDuration:(self.actionAnimationIn / 2) delay:self.actionDelayIn options:(UIViewAnimationOptionRepeat | UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionCurveEaseInOut | UIViewAnimationOptionAutoreverse) animations:^{
[UIView animateWithDuration:(self.actionAnimationIn / 2) delay:self.actionDelayIn options:(UIViewAnimationOptionRepeat | UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionCurveEaseInOut | UIViewAnimationOptionAutoreverse | UIViewAnimationOptionAllowUserInteraction) animations:^{
self.transform = CGAffineTransformMakeScale(self.actionPulseOffset, self.actionPulseOffset);
} completion:nil];
}
Expand Down
5 changes: 5 additions & 0 deletions PopTipDemo/PopTipDemo/AMViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ - (IBAction)actionButton:(UIButton *)sender
}


self.popTip.entranceAnimation = AMPopTipEntranceAnimationNone;
self.popTip.actionAnimation = AMPopTipActionAnimationFloat;

self.popTip.shouldDismissOnTap = YES;

/* Custom entrance animation */
// self.popTip.entranceAnimation = AMPopTipEntranceAnimationCustom;
// __weak AMViewController *weakSelf = self;
Expand Down

0 comments on commit cf92298

Please sign in to comment.