Tencent / QMUI_iOS

QMUI iOS——致力于提高项目 UI 开发效率的解决方案
http://qmuiteam.com/ios
Other
7.07k stars 1.37k forks source link

QMUIAlertController显示问题 #1262

Closed heisall closed 3 years ago

heisall commented 3 years ago

调用代码没有弹出,什么原因呢? QMUIAlertController *alertController = [[QMUIAlertController alloc] initWithTitle:@"确定删除?" message:@"删除后将无法恢复,请慎重考虑" preferredStyle:QMUIAlertControllerStyleAlert]; [alertController showWithAnimated:YES];

MoLice commented 3 years ago

提供的信息太少,至少贴一下使用场景或者 Xcode 控制台输出的相关信息。

heisall commented 3 years ago

场景是想在tableview cell选中的时候弹出一个选择框,仿照demo中的水平对齐方式弹窗那段写法,但是没有弹出,就想用一个最简单的提示测试一下,也不弹出,以下是调用代码 -(void)tableView:(UITableView )tableView didSelectRowAtIndexPath:(NSIndexPath )indexPath{

QMUIAlertController *alertController = [[QMUIAlertController alloc] initWithTitle:@"确定删除?" message:@"删除后将无法恢复,请慎重考虑" preferredStyle:QMUIAlertControllerStyleAlert];
[alertController showWithAnimated:YES];

}

MoLice commented 3 years ago

1252