diff --git a/RevealControllerExample/RevealControllerProject.xcodeproj/project.pbxproj b/RevealControllerExample/RevealControllerProject.xcodeproj/project.pbxproj index 9187dae..c00cd79 100755 --- a/RevealControllerExample/RevealControllerProject.xcodeproj/project.pbxproj +++ b/RevealControllerExample/RevealControllerProject.xcodeproj/project.pbxproj @@ -236,7 +236,7 @@ 5E605B9C14A081F900853025 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0500; + LastUpgradeCheck = 0630; }; buildConfigurationList = 5E605B9F14A081F900853025 /* Build configuration list for PBXProject "RevealControllerProject" */; compatibilityVersion = "Xcode 3.2"; @@ -337,11 +337,14 @@ CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", @@ -356,7 +359,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; PROVISIONING_PROFILE = ""; SDKROOT = iphoneos; @@ -374,10 +377,13 @@ CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = YES; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; @@ -386,7 +392,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; PROVISIONING_PROFILE = ""; SDKROOT = iphoneos; diff --git a/RevealControllerExample/RevealControllerProject/FrontViewController.m b/RevealControllerExample/RevealControllerProject/FrontViewController.m index 72a8f1d..afa0598 100755 --- a/RevealControllerExample/RevealControllerProject/FrontViewController.m +++ b/RevealControllerExample/RevealControllerProject/FrontViewController.m @@ -52,12 +52,12 @@ - (void)viewDidLoad [revealController tapGestureRecognizer]; UIBarButtonItem *revealButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"reveal-icon.png"] - style:UIBarButtonItemStyleBordered target:revealController action:@selector(revealToggle:)]; + style:UIBarButtonItemStylePlain target:revealController action:@selector(revealToggle:)]; self.navigationItem.leftBarButtonItem = revealButtonItem; UIBarButtonItem *rightRevealButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"reveal-icon.png"] - style:UIBarButtonItemStyleBordered target:revealController action:@selector(rightRevealToggle:)]; + style:UIBarButtonItemStylePlain target:revealController action:@selector(rightRevealToggle:)]; self.navigationItem.rightBarButtonItem = rightRevealButtonItem; } diff --git a/RevealControllerExample/RevealControllerProject/MapViewController.m b/RevealControllerExample/RevealControllerProject/MapViewController.m index be6144f..73e77c4 100755 --- a/RevealControllerExample/RevealControllerProject/MapViewController.m +++ b/RevealControllerExample/RevealControllerProject/MapViewController.m @@ -40,12 +40,12 @@ - (void)viewDidLoad //[self.navigationController.navigationBar addGestureRecognizer:revealController.panGestureRecognizer]; UIBarButtonItem *revealButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"reveal-icon.png"] - style:UIBarButtonItemStyleBordered target:revealController action:@selector(revealToggle:)]; + style:UIBarButtonItemStylePlain target:revealController action:@selector(revealToggle:)]; self.navigationItem.leftBarButtonItem = revealButtonItem; UIBarButtonItem *rightRevealButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"reveal-icon.png"] - style:UIBarButtonItemStyleBordered target:revealController action:@selector(rightRevealToggle:)]; + style:UIBarButtonItemStylePlain target:revealController action:@selector(rightRevealToggle:)]; self.navigationItem.rightBarButtonItem = rightRevealButtonItem; } diff --git a/SWRevealViewController/SWRevealViewController.m b/SWRevealViewController/SWRevealViewController.m index a657cc3..d378d13 100755 --- a/SWRevealViewController/SWRevealViewController.m +++ b/SWRevealViewController/SWRevealViewController.m @@ -407,12 +407,19 @@ - (BOOL)isInteractive return NO; // not supported } + - (BOOL)transitionWasCancelled { return NO; // not supported } +- (CGAffineTransform)targetTransform +{ + return CGAffineTransformIdentity; +} + + - (UIModalPresentationStyle)presentationStyle { return UIModalPresentationNone; // not applicable @@ -561,13 +568,13 @@ - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event if ( _dragging || self.state == UIGestureRecognizerStateFailed) return; - const int kDirectionPanThreshold = 5; + const CGFloat kDirectionPanThreshold = 5; UITouch *touch = [touches anyObject]; CGPoint nowPoint = [touch locationInView:self.view]; - if (abs(nowPoint.x - _beginPoint.x) > kDirectionPanThreshold) _dragging = YES; - else if (abs(nowPoint.y - _beginPoint.y) > kDirectionPanThreshold) self.state = UIGestureRecognizerStateFailed; + if (ABS(nowPoint.x - _beginPoint.x) > kDirectionPanThreshold) _dragging = YES; + else if (ABS(nowPoint.y - _beginPoint.y) > kDirectionPanThreshold) self.state = UIGestureRecognizerStateFailed; } @end @@ -1286,7 +1293,7 @@ - (void)_handleRevealGestureStateEndedWithRecognizer:(UIPanGestureRecognizer *)r NSTimeInterval duration = _toggleAnimationDuration; // Velocity driven change: - if (fabsf(velocity) > _quickFlickVelocity) + if (ABS(velocity) > _quickFlickVelocity) { // we may need to set the drag position and to adjust the animation duration CGFloat journey = xLocation; @@ -1304,7 +1311,7 @@ - (void)_handleRevealGestureStateEndedWithRecognizer:(UIPanGestureRecognizer *)r } } - duration = fabsf(journey/velocity); + duration = ABS(journey/velocity); } // Position driven change: @@ -1361,7 +1368,7 @@ - (void)_dispatchPushFrontViewController:(UIViewController *)newFrontViewControl NSTimeInterval duration = animated?_toggleAnimationDuration:0.0; NSTimeInterval firstDuration = duration; - int initialPosDif = abs( _frontViewPosition - preReplacementPosition ); + NSInteger initialPosDif = ABS( _frontViewPosition - preReplacementPosition ); if ( initialPosDif == 1 ) firstDuration *= 0.8; else if ( initialPosDif == 0 ) firstDuration = 0;