mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00

git-subtree-dir: submodules/HockeySDK-iOS git-subtree-mainline: 085acd26c4432939403765234266e3c1be0f3dd9 git-subtree-split: c7d0c7026303253e2ac576c02655691e5d314fe2
24 lines
554 B
Objective-C
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
|