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")

                }

            }))

  • 相关阅读:
    Web API总结
    @Html.Raw() 方法输出带有html标签的字符串
    jQuery
    图与树基础-完全图的判定
    图和树基础-蒜头君旅行
    PAT乙级1008
    PAT乙级1007
    PAT乙级1005
    PAT乙级1001
    前端工程化-webpack简介(一)
  • 原文地址:https://www.cnblogs.com/ChouDanDan/p/5088989.html
Copyright © 2011-2022 走看看