@@ -61,14 +61,14 @@ @interface QMUIAlertAction ()
6161@property (nonatomic , strong ) QMUIAlertButtonWrapView *buttonWrapView;
6262@property (nonatomic , copy , readwrite ) NSString *title;
6363@property (nonatomic , assign , readwrite ) QMUIAlertActionStyle style;
64- @property (nonatomic , copy ) void (^handler)(QMUIAlertAction *action);
64+ @property (nonatomic , copy ) void (^handler)(QMUIAlertController *aAlertController, QMUIAlertAction *action);
6565@property (nonatomic , weak ) id <QMUIAlertActionDelegate> delegate;
6666
6767@end
6868
6969@implementation QMUIAlertAction
7070
71- + (instancetype )actionWithTitle : (NSString *)title style : (QMUIAlertActionStyle)style handler : (void (^)(QMUIAlertAction *action ))handler {
71+ + (instancetype )actionWithTitle : (NSString *)title style : (QMUIAlertActionStyle)style handler : (void (^)(__kindof QMUIAlertController *, QMUIAlertAction *))handler {
7272 QMUIAlertAction *alertAction = [[QMUIAlertAction alloc ] init ];
7373 alertAction.title = title;
7474 alertAction.style = style;
@@ -1101,7 +1101,7 @@ - (void)handleMaskViewEvent:(id)sender {
11011101- (void )didClickAlertAction : (QMUIAlertAction *)alertAction {
11021102 [self hideWithAnimated: YES completion: ^{
11031103 if (alertAction.handler ) {
1104- alertAction.handler (alertAction);
1104+ alertAction.handler (self, alertAction);
11051105 alertAction.handler = nil ;
11061106 }
11071107 }];
0 commit comments