zoukankan      html  css  js  c++  java
  • Summarize code for the three presentation experiments

    Image Picker Controller

    @IBAction func experiment() {
        let controller = UIImagePickerController()        
        self.presentViewController(controller, animated: true, completion: nil)
    }
    

    Activity View Controller

       
    @IBAction func experiment() {
        let image = UIImage()
        let controller = UIActivityViewController(activityItems: [image], applicationActivities: nil) 
        self.presentViewController(controller, animated: true, completion: nil)
    }
    

    Alert View Controller

    @IBAction func experiment() {
        let controller = UIAlertController()
        controller.title = "Test alert"
        controller.message = "This is a test"
    
        // Dismiss the view controller after the user taps “ok”    
        let okAction = UIAlertAction (title:"ok", style: UIAlertActionStyle.Default) {
            action in self.dismissViewControllerAnimated(true, completion: nil)
        }
        controller.addAction(okAction) 
        self.presentViewController(controller, animated: true, completion:nil)
    }
  • 相关阅读:
    NPM 重新回炉
    构建工具
    工作的环境部署
    Proxy 代理
    Promise 的 用法及实现
    JS 的 继承
    动态规划——LCS
    矩阵连乘——动态规划
    线段树&树状数组
    SpringAOP
  • 原文地址:https://www.cnblogs.com/dagon/p/4733105.html
Copyright © 2011-2022 走看看