diff --git a/SWRevealViewController/SWRevealViewController.m b/SWRevealViewController/SWRevealViewController.m index d378d13..06fd586 100755 --- a/SWRevealViewController/SWRevealViewController.m +++ b/SWRevealViewController/SWRevealViewController.m @@ -479,6 +479,11 @@ - (CGRect)finalFrameForViewController:(UIViewController *)vc return _view.bounds; } +- (void)pauseInteractiveTransition { + return; +} + + @end @@ -1023,16 +1028,16 @@ - (void)_notifyPanGestureEnded - (void)_getRevealWidth:(CGFloat*)pRevealWidth revealOverDraw:(CGFloat*)pRevealOverdraw forSymetry:(int)symetry { - if ( symetry < 0 ) *pRevealWidth = _rightViewRevealWidth, *pRevealOverdraw = _rightViewRevealOverdraw; - else *pRevealWidth = _rearViewRevealWidth, *pRevealOverdraw = _rearViewRevealOverdraw; + if ( symetry < 0 ) (void)(*pRevealWidth = _rightViewRevealWidth), *pRevealOverdraw = _rightViewRevealOverdraw; + else (void)(*pRevealWidth = _rearViewRevealWidth), *pRevealOverdraw = _rearViewRevealOverdraw; if (*pRevealWidth < 0) *pRevealWidth = _contentView.bounds.size.width + *pRevealWidth; } - (void)_getBounceBack:(BOOL*)pBounceBack pStableDrag:(BOOL*)pStableDrag forSymetry:(int)symetry { - if ( symetry < 0 ) *pBounceBack = _bounceBackOnLeftOverdraw, *pStableDrag = _stableDragOnLeftOverdraw; - else *pBounceBack = _bounceBackOnOverdraw, *pStableDrag = _stableDragOnOverdraw; + if ( symetry < 0 ) (void)(*pBounceBack = _bounceBackOnLeftOverdraw), *pStableDrag = _stableDragOnLeftOverdraw; + else (void)(*pBounceBack = _bounceBackOnOverdraw), *pStableDrag = _stableDragOnOverdraw; } - (void)_getAdjustedFrontViewPosition:(FrontViewPosition*)frontViewPosition forSymetry:(int)symetry @@ -1398,11 +1403,11 @@ - (void)_dispatchTransitionOperation:(SWRevealControllerOperation)operation with // Primitive method for view controller deployment and animated layout to the given position. - (void)_setFrontViewPosition:(FrontViewPosition)newPosition withDuration:(NSTimeInterval)duration { - void (^rearDeploymentCompletion)() = [self _rearViewDeploymentForNewFrontViewPosition:newPosition]; - void (^rightDeploymentCompletion)() = [self _rightViewDeploymentForNewFrontViewPosition:newPosition]; - void (^frontDeploymentCompletion)() = [self _frontViewDeploymentForNewFrontViewPosition:newPosition]; + void (^rearDeploymentCompletion)(void) = [self _rearViewDeploymentForNewFrontViewPosition:newPosition]; + void (^rightDeploymentCompletion)(void) = [self _rightViewDeploymentForNewFrontViewPosition:newPosition]; + void (^frontDeploymentCompletion)(void) = [self _frontViewDeploymentForNewFrontViewPosition:newPosition]; - void (^animations)() = ^() + void (^animations)(void) = ^() { // Calling this in the animation block causes the status bar to appear/dissapear in sync with our own animation [self setNeedsStatusBarAppearanceUpdate]; @@ -1455,17 +1460,17 @@ - (void)_performTransitionOperation:(SWRevealControllerOperation)operation withV UIView *view = nil; if ( operation == SWRevealControllerOperationReplaceRearController ) - old = _rearViewController, _rearViewController = new, view = _contentView.rearView; + (void)(old = _rearViewController), (void)(_rearViewController = new), view = _contentView.rearView; else if ( operation == SWRevealControllerOperationReplaceFrontController ) - old = _frontViewController, _frontViewController = new, view = _contentView.frontView; + (void)(old = _frontViewController), (void)(_frontViewController = new), view = _contentView.frontView; else if ( operation == SWRevealControllerOperationReplaceRightController ) - old = _rightViewController, _rightViewController = new, view = _contentView.rightView; + (void)(old = _rightViewController), (void)(_rightViewController = new), view = _contentView.rightView; - void (^completion)() = [self _transitionFromViewController:old toViewController:new inView:view]; + void (^completion)(void) = [self _transitionFromViewController:old toViewController:new inView:view]; - void (^animationCompletion)() = ^ + void (^animationCompletion)(void) = ^ { completion(); if ( [_delegate respondsToSelector:@selector(revealController:didAddViewController:forOperation:animated:)] ) @@ -1527,10 +1532,10 @@ - (void)_performTransitionOperation:(SWRevealControllerOperation)operation withV _frontViewPosition = newPosition; - void (^deploymentCompletion)() = + void (^deploymentCompletion)(void) = [self _deploymentForViewController:_frontViewController inView:_contentView.frontView appear:appear disappear:disappear]; - void (^completion)() = ^() + void (^completion)(void) = ^() { deploymentCompletion(); if ( positionIsChanging ) @@ -1561,10 +1566,10 @@ - (void)_performTransitionOperation:(SWRevealControllerOperation)operation withV _rearViewPosition = newPosition; - void (^deploymentCompletion)() = + void (^deploymentCompletion)(void) = [self _deploymentForViewController:_rearViewController inView:_contentView.rearView appear:appear disappear:disappear]; - void (^completion)() = ^() + void (^completion)(void) = ^() { deploymentCompletion(); if ( disappear ) @@ -1589,10 +1594,10 @@ - (void)_performTransitionOperation:(SWRevealControllerOperation)operation withV _rightViewPosition = newPosition; - void (^deploymentCompletion)() = + void (^deploymentCompletion)(void) = [self _deploymentForViewController:_rightViewController inView:_contentView.rightView appear:appear disappear:disappear]; - void (^completion)() = ^() + void (^completion)(void) = ^() { deploymentCompletion(); if ( disappear ) @@ -1672,11 +1677,11 @@ - (void)_performTransitionOperation:(SWRevealControllerOperation)operation withV if ( toController ) [self addChildViewController:toController]; - void (^deployCompletion)() = [self _deployForViewController:toController inView:view]; + void (^deployCompletion)(void) = [self _deployForViewController:toController inView:view]; [fromController willMoveToParentViewController:nil]; - void (^undeployCompletion)() = [self _undeployForViewController:fromController]; + void (^undeployCompletion)(void) = [self _undeployForViewController:fromController]; void (^completionBlock)(void) = ^(void) {