Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Replacing roundf() with round() from thmath.h.

  • Loading branch information...
commit 54fb6992084d1b4a27e5cfc79fc02dc5c85f0868 1 parent bd02763
@matej authored
Showing with 2 additions and 4 deletions.
  1. +2 −4 MBPullDownController/MBPullDownController.m
View
6 MBPullDownController/MBPullDownController.m
@@ -9,9 +9,7 @@
#import "MBPullDownController.h"
#import <QuartzCore/QuartzCore.h>
#import <UIKit/UIGestureRecognizerSubclass.h>
-#import <objc/runtime.h>
-#import <objc/message.h>
-#include <math.h>
+#import <tgmath.h>
static CGFloat const kDefaultClosedTopOffset = 44.f;
@@ -381,7 +379,7 @@ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(N
}
// Simulate the scroll view elasticity effect while dragging in the open state
if (self.open && [self scrollView].dragging) {
- CGFloat delta = roundf((oldValue.y - newValue.y) / 3);
+ CGFloat delta = round((oldValue.y - newValue.y) / 3);
adjusted = CGPointMake(newValue.x, oldValue.y - delta);
self.adjustedScroll = YES; // prevent infinite recursion
scrollView.contentOffset = adjusted;
Please sign in to comment.
Something went wrong with that request. Please try again.