Skip to content
This repository has been archived by the owner on Sep 11, 2022. It is now read-only.

Xcode v8b6 warnings #242

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Source/PKRevealController/Classes/PKRevealControllerView.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>

@interface PKRevealControllerView : UIView
@interface PKRevealControllerView : UIView <CAAnimationDelegate>

#pragma mark - Properties
@property (nonatomic, assign, readwrite, getter = hasShadow) BOOL shadow;
Expand Down
1 change: 1 addition & 0 deletions Source/PKRevealController/Classes/PKRevealControllerView.m
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ - (void)setShadow:(BOOL)shadow
self.layer.shadowRadius = 0.0;
self.layer.shadowPath = nil;
}
_shadow = shadow;
}

#pragma mark - API
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
typedef void(^PKAnimationStartBlock)();
typedef void(^PKAnimationCompletionBlock)(BOOL finished);

@protocol PKAnimating <NSObject>
@protocol PKAnimating <NSObject, CAAnimationDelegate>

@required

Expand Down
11 changes: 6 additions & 5 deletions Source/PKRevealController/Modules/PKLayerAnimator/PKAnimation.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ @implementation PKSequentialAnimation

@synthesize layer = _layer;
@synthesize animating = _animating;
@synthesize key = _key;
@dynamic key;
@synthesize startHandler = _startHandler;
@synthesize completionHandler = _completionHandler;

Expand Down
7 changes: 4 additions & 3 deletions Source/PKRevealController/PKRevealController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -1364,7 +1365,7 @@ - (BOOL)shouldAutorotate
}
}

- (NSUInteger)supportedInterfaceOrientations
- (UIInterfaceOrientationMask)supportedInterfaceOrientations
{
if ([self hasLeftViewController] && [self hasRightViewController])
{
Expand Down