From d57923c061a833000b88f3df4fe21dc393569801 Mon Sep 17 00:00:00 2001 From: Michael Biggs Date: Tue, 21 Feb 2017 17:07:21 -0700 Subject: [PATCH] Added nullability specifiers --- Pod/Classes/UIAlertController+BetterConstructor.h | 6 +++--- Pod/Classes/UIAlertController+BetterConstructor.m | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Pod/Classes/UIAlertController+BetterConstructor.h b/Pod/Classes/UIAlertController+BetterConstructor.h index 78d0727..bda1865 100644 --- a/Pod/Classes/UIAlertController+BetterConstructor.h +++ b/Pod/Classes/UIAlertController+BetterConstructor.h @@ -27,7 +27,7 @@ #import -typedef void (^alertHandler_t)(UIAlertAction *action); +typedef void (^alertHandler_t)(UIAlertAction * _Nullable action); /** * A category adding a shorthand constructor to prevent creating a bunch of action objects. @@ -52,8 +52,8 @@ typedef void (^alertHandler_t)(UIAlertAction *action); * * @return an alert controller all ready to go without all the initialization/styling hastle of actions */ -+ (instancetype)alertControllerWithTitle:(NSString *)title message:(NSString *)message style:(UIAlertControllerStyle)style cancelButtonTitle:(NSString *)cancelTitle cancelButtonBlock:(alertHandler_t)cancelBlock destructiveButtonTitle:(NSString*)destructiveTitle destructiveButtonBlock:(alertHandler_t)destructiveBlock otherButtonTitlesAndBlocks:(id)otherTitlesAndBlocks, ... NS_REQUIRES_NIL_TERMINATION; ++ (nonnull instancetype)alertControllerWithTitle:(nullable NSString *)title message:(nullable NSString *)message style:(UIAlertControllerStyle)style cancelButtonTitle:(nullable NSString *)cancelTitle cancelButtonBlock:(nullable alertHandler_t)cancelBlock destructiveButtonTitle:(nullable NSString*)destructiveTitle destructiveButtonBlock:(nullable alertHandler_t)destructiveBlock otherButtonTitlesAndBlocks:(nullable id)otherTitlesAndBlocks, ... NS_REQUIRES_NIL_TERMINATION; @end -extern alertHandler_t const DisabledBlock; +extern alertHandler_t _Nonnull const DisabledBlock; diff --git a/Pod/Classes/UIAlertController+BetterConstructor.m b/Pod/Classes/UIAlertController+BetterConstructor.m index 49d501e..bf2c2ad 100644 --- a/Pod/Classes/UIAlertController+BetterConstructor.m +++ b/Pod/Classes/UIAlertController+BetterConstructor.m @@ -86,4 +86,4 @@ + (instancetype)alertControllerWithTitle:(NSString *)title message:(NSString *)m @end -alertHandler_t const DisabledBlock = ^(UIAlertAction * nope){}; \ No newline at end of file +alertHandler_t const DisabledBlock = ^(UIAlertAction * nope){};