Skip to content

Commit

Permalink
Minor refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
romaonthego committed Mar 23, 2014
1 parent e144e16 commit 0dd80a3
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions REMenu/REMenu.m
Expand Up @@ -242,7 +242,6 @@ - (void)showFromRect:(CGRect)rect inView:(UIView *)view
//
if (self.bounce) {
self.isAnimating = YES;

if ([UIView respondsToSelector:@selector(animateWithDuration:delay:usingSpringWithDamping:initialSpringVelocity:options:animations:completion:)]) {
[UIView animateWithDuration:self.animationDuration+self.bounceAnimationDuration
delay:0.0
Expand All @@ -257,7 +256,6 @@ - (void)showFromRect:(CGRect)rect inView:(UIView *)view
} completion:^(BOOL finished) {
self.isAnimating = NO;
}];

} else {
[UIView animateWithDuration:self.animationDuration
delay:0.0
Expand All @@ -272,9 +270,7 @@ - (void)showFromRect:(CGRect)rect inView:(UIView *)view
}];

}
}
else
{
} else {
[UIView animateWithDuration:self.animationDuration
delay:0.0
options:UIViewAnimationOptionBeginFromCurrentState|UIViewAnimationOptionCurveEaseInOut
Expand All @@ -296,7 +292,9 @@ - (void)showInView:(UIView *)view

- (void)showFromNavigationController:(UINavigationController *)navigationController
{
if (self.isAnimating) return;
if (self.isAnimating) {
return;
}

self.navigationBar = navigationController.navigationBar;
[self showFromRect:CGRectMake(0, 0, navigationController.navigationBar.frame.size.width, navigationController.view.frame.size.height) inView:navigationController.view];
Expand Down Expand Up @@ -369,7 +367,7 @@ - (void)close

- (CGFloat)combinedHeight
{
return self.items.count * self.itemHeight + self.items.count * self.separatorHeight + 40.0 + self.cornerRadius;
return self.items.count * self.itemHeight + self.items.count * self.separatorHeight + 40.0 + self.cornerRadius;
}

- (void)setNeedsLayout
Expand Down

0 comments on commit 0dd80a3

Please sign in to comment.