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

TBAlertController主动dismiss #13

Closed
devcxm opened this issue Jan 4, 2017 · 4 comments
Closed

TBAlertController主动dismiss #13

devcxm opened this issue Jan 4, 2017 · 4 comments

Comments

@devcxm
Copy link

devcxm commented Jan 4, 2017

建议TBAlertController重写以下方法来主动dismiss,通过adaptiveAlert的话还得使用者来兼容iOS7。
- (void)dismissViewControllerAnimated: (BOOL)flag completion: (void (^ __nullable)(void))completion

@yulingtianxia
Copy link
Owner

@devcxm 现在 TBAlertController 就是点击按钮后 dismiss,没太明白你描述的问题。欢迎提个 PR,或者阐述的详细些哈。

@devcxm
Copy link
Author

devcxm commented Feb 20, 2017

我的意思不是通过点击Alert上的按钮来dismiss。比如我弹出一个Alert,需要在3秒后自动dismiss。那么我还要这样做。

if ([self.alertController.adaptiveAlert isKindOfClass:[UIAlertView class]]) { [self.alertController.adaptiveAlert dismissWithClickedButtonIndex:-1 animated:YES]; } else if ([self.alertController.adaptiveAlert isKindOfClass:[UIAlertController class]]) { [self.alertController.adaptiveAlert dismissViewControllerAnimated:YES completion:nil]; } }

@yulingtianxia
Copy link
Owner

@devcxm 嗯了解了,确实有这个必要,等我稍后有空加上

@yulingtianxia
Copy link
Owner

done @devcxm

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

No branches or pull requests

2 participants