Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
yam-liu opened this issue Mar 16, 2014 · 0 comments
Assignees

Comments

@yam-liu
Copy link
Contributor

yam-liu commented Mar 16, 2014

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];
}
@ChrisXu ChrisXu self-assigned this Mar 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants