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

                }

            }))

  • 相关阅读:
    敏捷开发第五天
    敏捷开发第四天
    系统用户分析模型
    第三天敏捷开发
    第二天敏捷开发
    敏捷开发第一天
    第三周学习总结
    [学习笔记]莫队算法
    【网络流】Modular Production Line
    [学习笔记]set的使用
  • 原文地址:https://www.cnblogs.com/ChouDanDan/p/5088989.html
Copyright © 2011-2022 走看看