From 0adcc66015fd4f975b8d8607f470ba21e6a6f8ed Mon Sep 17 00:00:00 2001 From: Steven Fisher Date: Thu, 7 May 2015 10:42:52 -0700 Subject: [PATCH] Use __tg_fabs() instead of fabs(). __tg_fabs uses operator overloading to work with float or double. --- PDTSimpleCalendar/PDTSimpleCalendarViewController.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PDTSimpleCalendar/PDTSimpleCalendarViewController.m b/PDTSimpleCalendar/PDTSimpleCalendarViewController.m index cbd2c77..c3233ba 100644 --- a/PDTSimpleCalendar/PDTSimpleCalendarViewController.m +++ b/PDTSimpleCalendar/PDTSimpleCalendarViewController.m @@ -11,7 +11,7 @@ #import "PDTSimpleCalendarViewFlowLayout.h" #import "PDTSimpleCalendarViewCell.h" #import "PDTSimpleCalendarViewHeader.h" - +#import const CGFloat PDTSimpleCalendarOverlaySize = 14.0f; @@ -413,7 +413,7 @@ - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollection - (void)scrollViewWillEndDragging:(UIScrollView *)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset { //We only display the overlay view if there is a vertical velocity - if ( fabsf(velocity.y) > 0.0f) { + if ( __tg_fabs(velocity.y) > 0.0f) { if (self.overlayView.alpha < 1.0) { [UIView animateWithDuration:0.25 animations:^{ [self.overlayView setAlpha:1.0];