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

FCAlertView close on touch outside when should not. #50

Closed
andres9394 opened this issue Apr 23, 2017 · 5 comments
Closed

FCAlertView close on touch outside when should not. #50

andres9394 opened this issue Apr 23, 2017 · 5 comments
Assignees

Comments

@andres9394
Copy link

andres9394 commented Apr 23, 2017

Hi, this is my code but first a short explanation:
The alert view dismiss on outside touch no matter if I setting "NO" and I need the alert view to dismiss just when the background task have done! I guess this is a mistake in the alertView because the alert view dismiss when should not. Sorry for the english, I hope you can fix it, thank you and have a nice day.

[alert setDismissOnOutsideTouch:NO]; [alert showAlertWithTitle:@"Sending, please wait..." withSubtitle:nil withCustomImage:nil withDoneButtonTitle:nil andButtons:nil]; dispatch_queue_t queue = dispatch_queue_create("My queue", NULL); dispatch_async(queue, ^{ //code to be executed in the background NSLog(@"Inside background task"); [self sendDataToServer:@"POST"]; dispatch_async(dispatch_get_main_queue(), ^{ //code to be executed on the main thread when background task is finished NSLog(@"task done"); [alert dismissAlertView]; });

@nimati
Copy link
Owner

nimati commented May 3, 2017

Hi @andres9394

Thank you for using FCAlertView. I ran your code through my example app and it seems to be working fine. Is the issue that when the user touches OUTSIDE of the alert box, it dismisses? Would like it not dismiss at all even I press the buttons? Also, if you are adding any other customizations to the FCAlertView, please paste the code here so I can take a closer look.

@goodstechinc
Copy link

Has this issue been resolved?

@andres9394
Copy link
Author

Sorry. No, this issue has not been resolved. What I want is that when I touched outside of the alert box, it no not dismisses. The alert box should dismiss only if I touch the cancel button.

@nimati
Copy link
Owner

nimati commented Jun 6, 2017

@andres9394 I took a second look at your code, I think what's happening is that there's no button in your alert and there is no timer set to dismiss it. This automatically triggers [alert setDismissOnOutsideTouch:YES]; However, in the next version, you'll be able to bypass it.

@nimati nimati self-assigned this Aug 7, 2017
@nimati
Copy link
Owner

nimati commented Aug 7, 2017

This has been added to FCAlertView V1.4.0. Please try adding this to override the forced close:

alert.overrideForcedDismiss = 1;

Thanks for using FCAlertView!

@nimati nimati closed this as completed Aug 7, 2017
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

3 participants