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

使用alertControllerWithTitle初始化title和message都为空的情况下,不能弹出弹窗 #44

Open
xiruoruo opened this issue Jul 2, 2021 · 1 comment

Comments

@xiruoruo
Copy link

xiruoruo commented Jul 2, 2021

调试发现此时alertController的view高度为0,导致各子view都无法显示出来。

SPAlertController *alertController = [SPAlertController alertControllerWithTitle:nil message:nil preferredStyle:SPAlertControllerStyleActionSheet];
alertController.needDialogBlur = YES;

    SPAlertAction *actionQuit = [SPAlertAction actionWithTitle:CMString(@"自己", nil) style:SPAlertActionStyleDefault handler:^(SPAlertAction * _Nonnull action) {
    }];
    [alertController addAction:actionQuit];

    SPAlertAction *actionKill = [SPAlertAction actionWithTitle:CMString(@"他人", nil) style:SPAlertActionStyleDestructive handler:^(SPAlertAction * _Nonnull action) {
    }];
    [alertController addAction:actionKill];

SPAlertAction *actionCancel = [SPAlertAction actionWithTitle:CMString(@"取消", nil) style:SPAlertActionStyleCancel handler:^(SPAlertAction * _Nonnull action) {
}];
[alertController addAction:actionCancel];

[self presentViewController:alertController animated:YES completion:^{}];
@xiruoruo
Copy link
Author

xiruoruo commented Jul 2, 2021

现象与#34 相同

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

1 participant