From 252a9d0030ab4f3bd8887e105376632c9990bd5a Mon Sep 17 00:00:00 2001 From: Mark DiFranco Date: Mon, 18 Sep 2017 16:11:04 -0400 Subject: [PATCH] Fix source code warnings produced by Xcode 9 Specify void in block parameter lists --- RMessage/RMessage.h | 22 +++++++++++----------- RMessage/RMessage.m | 22 +++++++++++----------- RMessage/RMessageView.h | 4 ++-- RMessage/RMessageView.m | 8 ++++---- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/RMessage/RMessage.h b/RMessage/RMessage.h index c9bb8bc..1a5e042 100644 --- a/RMessage/RMessage.h +++ b/RMessage/RMessage.h @@ -60,7 +60,7 @@ typedef NS_ENUM(NSInteger, RMessageDuration) { RMessageDurationAutomatic = 0, RM + (void)showNotificationWithTitle:(NSString *)message type:(RMessageType)type customTypeName:(NSString *)customTypeName - callback:(void (^)())callback; + callback:(void (^)(void))callback; /** Shows a notification message @@ -76,7 +76,7 @@ typedef NS_ENUM(NSInteger, RMessageDuration) { RMessageDurationAutomatic = 0, RM subtitle:(NSString *)subtitle type:(RMessageType)type customTypeName:(NSString *)customTypeName - callback:(void (^)())callback; + callback:(void (^)(void))callback; /** Shows a notification message @@ -93,7 +93,7 @@ typedef NS_ENUM(NSInteger, RMessageDuration) { RMessageDurationAutomatic = 0, RM type:(RMessageType)type customTypeName:(NSString *)customTypeName duration:(NSTimeInterval)duration - callback:(void (^)())callback; + callback:(void (^)(void))callback; /** Shows a notification message @@ -112,7 +112,7 @@ typedef NS_ENUM(NSInteger, RMessageDuration) { RMessageDurationAutomatic = 0, RM type:(RMessageType)type customTypeName:(NSString *)customTypeName duration:(NSTimeInterval)duration - callback:(void (^)())callback + callback:(void (^)(void))callback canBeDismissedByUser:(BOOL)dismissingEnabled; /** @@ -137,9 +137,9 @@ typedef NS_ENUM(NSInteger, RMessageDuration) { RMessageDurationAutomatic = 0, RM type:(RMessageType)type customTypeName:(NSString *)customTypeName duration:(NSTimeInterval)duration - callback:(void (^)())callback + callback:(void (^)(void))callback buttonTitle:(NSString *)buttonTitle - buttonCallback:(void (^)())buttonCallback + buttonCallback:(void (^)(void))buttonCallback atPosition:(RMessagePosition)messagePosition canBeDismissedByUser:(BOOL)dismissingEnabled; @@ -160,7 +160,7 @@ typedef NS_ENUM(NSInteger, RMessageDuration) { RMessageDurationAutomatic = 0, RM subtitle:(NSString *)subtitle type:(RMessageType)type customTypeName:(NSString *)customTypeName - callback:(void (^)())callback; + callback:(void (^)(void))callback; /** Shows a notification message in a specific view controller @@ -181,7 +181,7 @@ typedef NS_ENUM(NSInteger, RMessageDuration) { RMessageDurationAutomatic = 0, RM type:(RMessageType)type customTypeName:(NSString *)customTypeName duration:(NSTimeInterval)duration - callback:(void (^)())callback; + callback:(void (^)(void))callback; /** Shows a notification message in a specific view controller @@ -203,7 +203,7 @@ typedef NS_ENUM(NSInteger, RMessageDuration) { RMessageDurationAutomatic = 0, RM type:(RMessageType)type customTypeName:(NSString *)customTypeName duration:(NSTimeInterval)duration - callback:(void (^)())callback + callback:(void (^)(void))callback canBeDismissedByUser:(BOOL)dismissingEnabled; /** @@ -230,9 +230,9 @@ typedef NS_ENUM(NSInteger, RMessageDuration) { RMessageDurationAutomatic = 0, RM type:(RMessageType)type customTypeName:(NSString *)customTypeName duration:(NSTimeInterval)duration - callback:(void (^)())callback + callback:(void (^)(void))callback buttonTitle:(NSString *)buttonTitle - buttonCallback:(void (^)())buttonCallback + buttonCallback:(void (^)(void))buttonCallback atPosition:(RMessagePosition)messagePosition canBeDismissedByUser:(BOOL)dismissingEnabled; diff --git a/RMessage/RMessage.m b/RMessage/RMessage.m index 9d6cb28..116864c 100644 --- a/RMessage/RMessage.m +++ b/RMessage/RMessage.m @@ -40,7 +40,7 @@ + (instancetype)sharedMessage + (void)showNotificationWithTitle:(NSString *)title type:(RMessageType)type customTypeName:(NSString *)customTypeName - callback:(void (^)())callback + callback:(void (^)(void))callback { [self showNotificationWithTitle:title subtitle:nil type:type customTypeName:customTypeName callback:callback]; } @@ -49,7 +49,7 @@ + (void)showNotificationWithTitle:(NSString *)title subtitle:(NSString *)subtitle type:(RMessageType)type customTypeName:(NSString *)customTypeName - callback:(void (^)())callback + callback:(void (^)(void))callback { [self showNotificationInViewController:_defaultViewController title:title @@ -64,7 +64,7 @@ + (void)showNotificationWithTitle:(NSString *)title type:(RMessageType)type customTypeName:(NSString *)customTypeName duration:(NSTimeInterval)duration - callback:(void (^)())callback + callback:(void (^)(void))callback { [self showNotificationInViewController:_defaultViewController title:title @@ -80,7 +80,7 @@ + (void)showNotificationWithTitle:(NSString *)title type:(RMessageType)type customTypeName:(NSString *)customTypeName duration:(NSTimeInterval)duration - callback:(void (^)())callback + callback:(void (^)(void))callback canBeDismissedByUser:(BOOL)dismissingEnabled { [self showNotificationInViewController:_defaultViewController @@ -99,9 +99,9 @@ + (void)showNotificationWithTitle:(NSString *)title type:(RMessageType)type customTypeName:(NSString *)customTypeName duration:(NSTimeInterval)duration - callback:(void (^)())callback + callback:(void (^)(void))callback buttonTitle:(NSString *)buttonTitle - buttonCallback:(void (^)())buttonCallback + buttonCallback:(void (^)(void))buttonCallback atPosition:(RMessagePosition)messagePosition canBeDismissedByUser:(BOOL)dismissingEnabled { @@ -125,7 +125,7 @@ + (void)showNotificationInViewController:(UIViewController *)viewController type:(RMessageType)type customTypeName:(NSString *)customTypeName duration:(NSTimeInterval)duration - callback:(void (^)())callback + callback:(void (^)(void))callback { [self showNotificationInViewController:viewController title:title @@ -147,7 +147,7 @@ + (void)showNotificationInViewController:(UIViewController *)viewController type:(RMessageType)type customTypeName:(NSString *)customTypeName duration:(NSTimeInterval)duration - callback:(void (^)())callback + callback:(void (^)(void))callback canBeDismissedByUser:(BOOL)dismissingEnabled { [self showNotificationInViewController:viewController @@ -169,7 +169,7 @@ + (void)showNotificationInViewController:(UIViewController *)viewController subtitle:(NSString *)subtitle type:(RMessageType)type customTypeName:(NSString *)customTypeName - callback:(void (^)())callback + callback:(void (^)(void))callback { [self showNotificationInViewController:viewController title:title @@ -192,9 +192,9 @@ + (void)showNotificationInViewController:(UIViewController *)viewController type:(RMessageType)type customTypeName:(NSString *)customTypeName duration:(NSTimeInterval)duration - callback:(void (^)())callback + callback:(void (^)(void))callback buttonTitle:(NSString *)buttonTitle - buttonCallback:(void (^)())buttonCallback + buttonCallback:(void (^)(void))buttonCallback atPosition:(RMessagePosition)messagePosition canBeDismissedByUser:(BOOL)dismissingEnabled { diff --git a/RMessage/RMessageView.h b/RMessage/RMessageView.h index 70f4cc6..e67fe96 100644 --- a/RMessage/RMessageView.h +++ b/RMessage/RMessageView.h @@ -98,9 +98,9 @@ customTypeName:(NSString *)customTypeName duration:(CGFloat)duration inViewController:(UIViewController *)viewController - callback:(void (^)())callback + callback:(void (^)(void))callback buttonTitle:(NSString *)buttonTitle - buttonCallback:(void (^)())buttonCallback + buttonCallback:(void (^)(void))buttonCallback atPosition:(RMessagePosition)position canBeDismissedByUser:(BOOL)dismissingEnabled; diff --git a/RMessage/RMessageView.m b/RMessage/RMessageView.m index 29fb107..c93cd2e 100644 --- a/RMessage/RMessageView.m +++ b/RMessage/RMessageView.m @@ -50,9 +50,9 @@ @interface RMessageView () /** The vertical space between the message view top to its view controller top */ @property (nonatomic, strong) NSLayoutConstraint *topToVCLayoutConstraint; -@property (nonatomic, copy) void (^callback)(); +@property (nonatomic, copy) void (^callback)(void); -@property (nonatomic, copy) void (^buttonCallback)(); +@property (nonatomic, copy) void (^buttonCallback)(void); /** The starting constant value that should be set for the topToVCTopLayoutConstraint when animating */ @property (nonatomic, assign) CGFloat topToVCStartConstant; @@ -208,9 +208,9 @@ - (instancetype)initWithDelegate:(id)delegate customTypeName:(NSString *)customTypeName duration:(CGFloat)duration inViewController:(UIViewController *)viewController - callback:(void (^)())callback + callback:(void (^)(void))callback buttonTitle:(NSString *)buttonTitle - buttonCallback:(void (^)())buttonCallback + buttonCallback:(void (^)(void))buttonCallback atPosition:(RMessagePosition)position canBeDismissedByUser:(BOOL)dismissingEnabled {