diff --git a/Source/PKRevealController/Classes/PKRevealControllerView.h b/Source/PKRevealController/Classes/PKRevealControllerView.h index 195abd0..9ff80e8 100644 --- a/Source/PKRevealController/Classes/PKRevealControllerView.h +++ b/Source/PKRevealController/Classes/PKRevealControllerView.h @@ -27,7 +27,7 @@ #import #import -@interface PKRevealControllerView : UIView +@interface PKRevealControllerView : UIView #pragma mark - Properties @property (nonatomic, assign, readwrite, getter = hasShadow) BOOL shadow; diff --git a/Source/PKRevealController/Classes/PKRevealControllerView.m b/Source/PKRevealController/Classes/PKRevealControllerView.m index 2b1fcf8..45f4166 100644 --- a/Source/PKRevealController/Classes/PKRevealControllerView.m +++ b/Source/PKRevealController/Classes/PKRevealControllerView.m @@ -66,6 +66,7 @@ - (void)setShadow:(BOOL)shadow self.layer.shadowRadius = 0.0; self.layer.shadowPath = nil; } + _shadow = shadow; } #pragma mark - API diff --git a/Source/PKRevealController/Modules/PKLayerAnimator/PKAnimating.h b/Source/PKRevealController/Modules/PKLayerAnimator/PKAnimating.h index 3a7e00f..78698ef 100644 --- a/Source/PKRevealController/Modules/PKLayerAnimator/PKAnimating.h +++ b/Source/PKRevealController/Modules/PKLayerAnimator/PKAnimating.h @@ -30,7 +30,7 @@ typedef void(^PKAnimationStartBlock)(); typedef void(^PKAnimationCompletionBlock)(BOOL finished); -@protocol PKAnimating +@protocol PKAnimating @required diff --git a/Source/PKRevealController/Modules/PKLayerAnimator/PKAnimation.m b/Source/PKRevealController/Modules/PKLayerAnimator/PKAnimation.m index d13c03c..ee83bbb 100644 --- a/Source/PKRevealController/Modules/PKLayerAnimator/PKAnimation.m +++ b/Source/PKRevealController/Modules/PKLayerAnimator/PKAnimation.m @@ -32,23 +32,24 @@ @implementation PKAnimation @synthesize layer = _layer; @synthesize animating = _animating; -@synthesize key = _key; +@dynamic key; @synthesize startHandler = _startHandler; @synthesize completionHandler = _completionHandler; #pragma mark - Initialization -+ (id)animation ++ (instancetype)animation { - CABasicAnimation *animation = [super animation]; + PKAnimation *animation = self.new; animation.delegate = animation; return animation; } -+ (id)animationWithKeyPath:(NSString *)path ++ (instancetype)animationWithKeyPath:(NSString *)path { - CABasicAnimation *animation = [super animationWithKeyPath:path]; + PKAnimation *animation = self.new; animation.delegate = animation; + animation.keyPath = path; return animation; } diff --git a/Source/PKRevealController/Modules/PKLayerAnimator/PKSequentialAnimation.m b/Source/PKRevealController/Modules/PKLayerAnimator/PKSequentialAnimation.m index 1496356..e113461 100644 --- a/Source/PKRevealController/Modules/PKLayerAnimator/PKSequentialAnimation.m +++ b/Source/PKRevealController/Modules/PKLayerAnimator/PKSequentialAnimation.m @@ -38,7 +38,7 @@ @implementation PKSequentialAnimation @synthesize layer = _layer; @synthesize animating = _animating; -@synthesize key = _key; +@dynamic key; @synthesize startHandler = _startHandler; @synthesize completionHandler = _completionHandler; diff --git a/Source/PKRevealController/PKRevealController.m b/Source/PKRevealController/PKRevealController.m index 6ecd223..ba58181 100644 --- a/Source/PKRevealController/PKRevealController.m +++ b/Source/PKRevealController/PKRevealController.m @@ -552,6 +552,7 @@ - (void)loadDefaultValues _leftViewWidthRange = DEFAULT_LEFT_VIEW_WIDTH_RANGE; _rightViewWidthRange = DEFAULT_RIGHT_VIEW_WIDTH_RANGE; _recognizesResetTapOnFrontViewInPresentationMode = DEFAULT_RECOGNIZES_RESET_TAP_ON_FRONT_VIEW_IN_PRESENTATION_MODE_VALUE; + _state = PKRevealControllerShowsFrontViewController; } - (void)setupContainerViews @@ -825,7 +826,7 @@ - (CGFloat)dampenedValueForRealValue:(CGFloat)realValue inRange:(NSRange)absolut { BOOL isNegative = (realValue < 0); - realValue = fabsf(realValue); + realValue = fabs(realValue); // PKLog(@"Range: [%u, %u], Real Value: %f", absoluteRange.location, (absoluteRange.location + absoluteRange.length), realValue); @@ -1059,7 +1060,7 @@ - (BOOL)shouldMoveFrontViewRightwardsForVelocity:(CGFloat)velocity - (BOOL)shouldMoveFrontViewLeftwardsForVelocity:(CGFloat)velocity { - return (velocity < 0 && fabsf(velocity) > self.quickSwipeVelocity); + return (velocity < 0 && fabs(velocity) > self.quickSwipeVelocity); } #pragma mark - View Controller Containment @@ -1364,7 +1365,7 @@ - (BOOL)shouldAutorotate } } -- (NSUInteger)supportedInterfaceOrientations +- (UIInterfaceOrientationMask)supportedInterfaceOrientations { if ([self hasLeftViewController] && [self hasRightViewController]) {