Peter 76e5a7fab6 Add 'submodules/HockeySDK-iOS/' from commit 'c7d0c7026303253e2ac576c02655691e5d314fe2'
git-subtree-dir: submodules/HockeySDK-iOS
git-subtree-mainline: 085acd26c4432939403765234266e3c1be0f3dd9
git-subtree-split: c7d0c7026303253e2ac576c02655691e5d314fe2
2019-06-11 18:53:14 +01:00

24 lines
554 B
Objective-C

#import "BITAlertAction.h"
@interface BITAlertAction ()
@property (nonatomic, copy) void (^storedHandler)(UIAlertAction * _Nonnull);
@end
@implementation BITAlertAction
+ (UIAlertAction *)actionWithTitle:(nullable NSString *)title style:(UIAlertActionStyle)style handler:(void (^)(UIAlertAction *_Nonnull))handler {
BITAlertAction *action = [super actionWithTitle:title style:style handler:handler];
action.storedHandler = handler;
return action;
}
- (void)invokeAction {
if (self.storedHandler) {
self.storedHandler(self);
}
}
@end