zoukankan      html  css  js  c++  java
  • Swift

     

            let alert = UIAlertController(title: "Alert", message: "Message", preferredStyle: UIAlertControllerStyle.Alert)

            alert.addAction(UIAlertAction(title: "Click", style: UIAlertActionStyle.Default, handler: nil))

            self.presentViewController(alert, animated: true, completion: nil)

            alert.addAction(UIAlertAction(title: "lala", style: UIAlertActionStyle.Cancel, handler: { (action) in

                switch action.style{

                case .Default:

                    print("default")

                    

                case .Cancel:

                    print("cancel")

                    

                case .Destructive:

                    print("destructive")

                }

            }))

            

            alert.addAction(UIAlertAction(title: "Ok", style: .Default, handler: { action in

                switch action.style{

                case .Default:

                    print("default")

                    

                case .Cancel:

                    print("cancel")

                    

                case .Destructive:

                    print("destructive")

                }

            }))

  • 相关阅读:
    C语言II博客作业04
    C语言II博客作业03
    C语言II博客作业02
    C语言II博客作业01
    C语言学期总结
    计科二班李英本周第一次作业
    C语言I博客作业09
    C语言I博客作业08
    C语言I博客作业07
    C语言I博客作业06
  • 原文地址:https://www.cnblogs.com/ChouDanDan/p/5088989.html
Copyright © 2011-2022 走看看