Skip to content

Commit

Permalink
* Fixed warnings in the user of the fabs function
Browse files Browse the repository at this point in the history
* Fixed a warning with wrong use for UIDeviceOrientaion instead of UIInterfaceOrientaion
  • Loading branch information
Aubada Taljo committed Jun 15, 2015
1 parent 14fb616 commit cf2247f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions AMSlideMenu/AMSlideMenuMainViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ - (void)switchCurrentActiveControllerToController:(UINavigationController *)nvc
if (!UIInterfaceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation)) {
CGRect frame = self.currentActiveNVC.view.frame;

if (UI_USER_INTERFACE_IDIOM() != UIUserInterfaceIdiomPad || UIDeviceOrientationIsPortrait(initialOrientation)) {
if (UI_USER_INTERFACE_IDIOM() != UIUserInterfaceIdiomPad || UIInterfaceOrientationIsPortrait(initialOrientation)) {
frame.origin.y = -20;
}

Expand Down Expand Up @@ -1105,7 +1105,7 @@ - (void)handlePanGesture:(UIPanGestureRecognizer *)gesture

if (self.menuState == AMSlideMenuLeftOpened)
{
if (fabsf(translation.x) > kPanMinTranslationX && translation.x < 0)
if (fabs(translation.x) > kPanMinTranslationX && translation.x < 0)
{
[self closeLeftMenu];
}
Expand All @@ -1118,7 +1118,7 @@ - (void)handlePanGesture:(UIPanGestureRecognizer *)gesture
}
else if (self.menuState == AMSlideMenuRightOpened)
{
if (fabsf(translation.x) > kPanMinTranslationX && translation.x > 0)
if (fabs(translation.x) > kPanMinTranslationX && translation.x > 0)
{
[self closeRightMenu];
}
Expand All @@ -1134,7 +1134,7 @@ - (void)handlePanGesture:(UIPanGestureRecognizer *)gesture
{
if (panningState == AMSlidePanningStateRight && self.leftMenu)
{
if (fabsf(translation.x) > kPanMinTranslationX && translation.x > 0)
if (fabs(translation.x) > kPanMinTranslationX && translation.x > 0)
{
[self openLeftMenu];
}
Expand All @@ -1147,7 +1147,7 @@ - (void)handlePanGesture:(UIPanGestureRecognizer *)gesture
}
else if (panningState == AMSlidePanningStateLeft && self.rightMenu)
{
if (fabsf(translation.x) > kPanMinTranslationX && translation.x < 0)
if (fabs(translation.x) > kPanMinTranslationX && translation.x < 0)
{
[self openRightMenu];
}
Expand Down Expand Up @@ -1219,7 +1219,7 @@ - (void)configure3DTransformForMenu:(AMSlideMenu)menu panningView:(UIView *)pann
{
if (self.statusBarView)
{
self.statusBarView.layer.opacity = 1 - fabsf(panningView.frame.origin.x) / [self rightMenuWidth];
self.statusBarView.layer.opacity = 1 - fabs(panningView.frame.origin.x) / [self rightMenuWidth];
}
}
/********************************************* STATUS BAR FIX *******************************************************/
Expand All @@ -1233,7 +1233,7 @@ - (void)configure3DTransformForMenu:(AMSlideMenu)menu panningView:(UIView *)pann
}
else if(menu == AMSlideMenuRight)
{
CGFloat alpha = [self maxDarknessWhileRightMenu] * (fabsf(panningView.frame.origin.x) / [self rightMenuWidth]);
CGFloat alpha = [self maxDarknessWhileRightMenu] * (fabs(panningView.frame.origin.x) / [self rightMenuWidth]);

self.darknessView.alpha = alpha;
}
Expand Down

0 comments on commit cf2247f

Please sign in to comment.