Swift-在AppDelegate弹框(UIAlertController)进行present跳转--学习笔记

来源:互联网 发布:游戏网络推广员 编辑:程序博客网 时间:2024/05/16 02:02

        let alertController =UIAlertController(title:"温馨提示",

                                                message:"你有一条消息", preferredStyle: .alert)

        

        

        let okAction =UIAlertAction(title:"查看", style: .default, handler: {

            action in

            print("点击了确定")

        })

        alertController.addAction(okAction)

        UIApplication.shared.keyWindow?.rootViewController?.present(alertController, animated: true, completion: nil)

0 0
原创粉丝点击