Skip to content

alert another cxalertview in button handler will make self.view unaccessable after dismiss this two alertview. #16

Description

@yam-liu

Just replace following code in your demo with this, and you can see how this bug come out.

- (IBAction)showCXAlert:(id)sender
{
    CXAlertView *alertViewMe = [[CXAlertView alloc] initWithTitle:defaultMessageTitle message:@"Something about me...." cancelButtonTitle:nil];
    [alertViewMe addButtonWithTitle:@"click me first"
                               type:CXAlertViewButtonTypeDefault
                            handler:^(CXAlertView *alertView, CXAlertButtonItem *button) {
                                [alertView dismiss];
                                [[[CXAlertView alloc] initWithTitle:@"Alert"
                                                            message:@"Notice that this alert view's background is darker(double gray) than the first one, and no dark background on self.view"
                                                  cancelButtonTitle:@"Dismiss"] show];
                            }];

    [alertViewMe addButtonWithTitle:@"click me"
                               type:CXAlertViewButtonTypeDefault
                            handler:^(CXAlertView *alertView, CXAlertButtonItem *button) {
                                [[[CXAlertView alloc] initWithTitle:@"Alert"
                                                            message:@"After you dismiss this alert view, the self.view can not be accessable, only change background view's alpha to 1 but not removed?"
                                                  cancelButtonTitle:@"Dismiss"] show];
                                [alertView dismiss];
                            }];

    [alertViewMe show];
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions