首页 > 解决方案 > 使用 nativescript typescript 在 ios 中关闭 Modal 时显示 FancyAlert 时 UI 将被阻止

问题描述

我正在使用原生脚本 angular 开发一个 ios 和 android 移动应用程序。我正在使用 TNSFancyalert 插件来显示警报信息,当我关闭此 TNSFancyAlert 时,对话框已关闭,但插件正在影响主 UI。这个插件有问题吗?

标签: nativescriptnativescript-angular

解决方案


尝试像这样实现:-

  1. 安装 tns 插件添加 nativescript-fancyalert。

  2. 立即导入:-

    从“nativescript-fancyalert”导入 { TNSFancyAlert, TNSFancyAlertButton };

  3. 来电提醒:-

    // 显示成功

    TNSFancyAlert.showSuccess("Success!", "Fancy alerts are nice.", "Yes they are!" );

  4. 其他的喜欢:-

    // 显示成功

    TNSFancyAlert.showSuccess( "Success!", "Fancy alerts are nice.", "Yes they are!" ).then(() => { /* 用户按下按钮 */ });


推荐阅读