From a61dfa2be9894b65ad0e8a75af4eb3ab72c0cee1 Mon Sep 17 00:00:00 2001 From: "Andrew W. Donoho" Date: Sun, 16 Mar 2014 16:20:18 -0500 Subject: [PATCH 1/5] Initialize state to a well defined value. In iOS v7.1, the preferredStatusBar style is incorrectly detected. This fixes the problem by setting the state to match the initial state of the controller. --- Source/PKRevealController/PKRevealController.m | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/PKRevealController/PKRevealController.m b/Source/PKRevealController/PKRevealController.m index 6ecd223..c75ca13 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 From 8aaca9f59d25a16345c60ca36d7c55cc47839863 Mon Sep 17 00:00:00 2001 From: "Andrew W. Donoho" Date: Sun, 23 Mar 2014 11:24:38 -0500 Subject: [PATCH 2/5] Set the value in the setter. --- Source/PKRevealController/Classes/PKRevealControllerView.m | 1 + 1 file changed, 1 insertion(+) 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 From 81c1e523130b61440127d8b7215129809649f3dd Mon Sep 17 00:00:00 2001 From: "Andrew W. Donoho" Date: Sun, 23 Mar 2014 11:25:22 -0500 Subject: [PATCH 3/5] Make a readonly property appropriately dynamic. --- Source/PKRevealController/Modules/PKLayerAnimator/PKAnimation.m | 2 +- .../Modules/PKLayerAnimator/PKSequentialAnimation.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/PKRevealController/Modules/PKLayerAnimator/PKAnimation.m b/Source/PKRevealController/Modules/PKLayerAnimator/PKAnimation.m index d13c03c..8508914 100644 --- a/Source/PKRevealController/Modules/PKLayerAnimator/PKAnimation.m +++ b/Source/PKRevealController/Modules/PKLayerAnimator/PKAnimation.m @@ -32,7 +32,7 @@ @implementation PKAnimation @synthesize layer = _layer; @synthesize animating = _animating; -@synthesize key = _key; +@dynamic key; @synthesize startHandler = _startHandler; @synthesize completionHandler = _completionHandler; 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; From 974e839420eb3279431fbe3f73ee8bf5ef6b0897 Mon Sep 17 00:00:00 2001 From: "Andrew W. Donoho" Date: Sat, 25 Oct 2014 17:47:31 -0500 Subject: [PATCH 4/5] Fixed an incorrect cast of an animation. --- .../Modules/PKLayerAnimator/PKAnimation.m | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Source/PKRevealController/Modules/PKLayerAnimator/PKAnimation.m b/Source/PKRevealController/Modules/PKLayerAnimator/PKAnimation.m index 8508914..ee83bbb 100644 --- a/Source/PKRevealController/Modules/PKLayerAnimator/PKAnimation.m +++ b/Source/PKRevealController/Modules/PKLayerAnimator/PKAnimation.m @@ -38,17 +38,18 @@ @implementation PKAnimation #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; } From b512333cb642f1c52ad3029c4dab6f4c0d3a617c Mon Sep 17 00:00:00 2001 From: "Andrew W. Donoho" Date: Mon, 22 Aug 2016 16:09:40 -0500 Subject: [PATCH 5/5] Fix warnings from Xcode v8b6. --- Source/PKRevealController/Classes/PKRevealControllerView.h | 2 +- .../Modules/PKLayerAnimator/PKAnimating.h | 2 +- Source/PKRevealController/PKRevealController.m | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) 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/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/PKRevealController.m b/Source/PKRevealController/PKRevealController.m index c75ca13..ba58181 100644 --- a/Source/PKRevealController/PKRevealController.m +++ b/Source/PKRevealController/PKRevealController.m @@ -826,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); @@ -1060,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 @@ -1365,7 +1365,7 @@ - (BOOL)shouldAutorotate } } -- (NSUInteger)supportedInterfaceOrientations +- (UIInterfaceOrientationMask)supportedInterfaceOrientations { if ([self hasLeftViewController] && [self hasRightViewController]) {