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

Summarize code for the three presentation experiments的更多相关文章

  1. 如何在 VS Code 中搭建 Qt 开发环境

    前言 VS Code 高大上的界面.强大的智能联想和庞大的插件市场,着实让人对他爱不释手.虽然可以更改 Qt Creator 的主题,但是 Qt Creator 的代码体验实在差劲.下面就来看看如何在 ...

  2. 关于Go,你可能不注意的7件事(转的)

    http://tonybai.com/2015/09/17/7-things-you-may-not-pay-attation-to-in-go/ code https://github.com/bi ...

  3. Top 10 Programming Fonts

    Top 10 Programming Fonts Sunday, 17 May 2009 • Permalink Update: This post was written back in 2009, ...

  4. py-faster-rcnn代码阅读2-config.py

    简介  该文件指定了用于fast rcnn训练的默认config选项,不能随意更改,如需更改,应当用yaml再写一个config_file,然后使用cfg_from_file(filename)导入以 ...

  5. keynote代码高亮【转】

    码农即使做ppt,也离不开代码,在keynote下,如果要粘贴代码,如何做到语法高亮呢? 补充1,该功能由pygments提供支持,所以支持的语言见:http://pygments.org/langu ...

  6. Microsoft .NET Pet Shop 4: Migrating an ASP.NET 1.1 Application to 2.0

    249 out of 297 rated this helpful - Rate this topic Gregory Leake Microsoft Corporation Alan Le, Ale ...

  7. Model-View-ViewModel (MVVM) Explained 转摘自:http://www.wintellect.com/blogs/jlikness/model-view-viewmodel-mvvm-explained

    The purpose of this post is to provide an introduction to the Model-View-ViewModel (MVVM) pattern. W ...

  8. [Tools] Scroll, Zoom, and Highlight code in a mdx-deck slide presentation with Code Surfer <🏄/>

    If you have a presentation coming up or you just need to present some documentation, then the Code S ...

  9. 从Script到Code Blocks、Code Behind到MVC、MVP、MVVM

    刚过去的周五(3-14)例行地主持了技术会议,主题正好是<UI层的设计模式——从Script.Code Behind到MVC.MVP.MVVM>,是前一天晚上才定的,中午花了半小时准备了下 ...

随机推荐

  1. char 汉字

    Unicode/UCS总结: UCS和Unicode使用最大32bit来表示字符(它的范围很大,但不一定全使用,常使的是UCS-2),它用2~4个字节的空间描述了已知的接近全部的字符(并且仍在更新,还 ...

  2. 视频最后用使用了function(i,ot)一笔带过,但我看不懂i和ot这2个参数的具体值是怎么获取得到的,能不能说一下参数传递过程?

    使用函数设置文本内容: $(selector).text(function(index,currentcontent)) 参数描述content必需.规定被选元素的新文本内容.注意:  特殊字符会被编 ...

  3. java学习_文件工具类

    工具类里面的方法全部都是静态的,调用的时候不需要实例化

  4. javascript闭包的一个例子

    <html> <head> <title>elementFromPoint</title> <script type="text/jav ...

  5. Understanding Asynchronous IO With Python 3.4's Asyncio And Node.js

    [转自]http://sahandsaba.com/understanding-asyncio-node-js-python-3-4.html Introduction I spent this su ...

  6. [ASP.NET]动态绑定树控件:

    public void BindTree(TreeView tview, TreeNode tn_main, string parentId,string sql) { TreeNode tn=nul ...

  7. Error Dropping Database (Can't rmdir '.test\', errno: 17)

    MySql 删除数据库出错:Can't rmdir '.\test\', errno: 17 到test数据下的所在的目前data\test目录,删除掉所有的文件后,就可以删除数据了

  8. zabbix通过sendmail进行邮箱警报

    安装sendmail /usr/lib/zabbix/alertscripts/SendEmail.sh #!/bin/bash to_email_address="$1" # 收 ...

  9. 在 angularjs 中集成 bootstrap typeahead

    问题 在使用 typeahead 的时候,有这样一个需求,当用户选中其中一项的之后,将项目对应的 id 保存到另外一个变量中,以后在提交表单的时候,将这个 id 发送到服务器中. 但是,在 typea ...

  10. Android开发中,那些让你相见恨晚的方法、类或接口

    1.getParent().requestDisallowInterceptTouchEvent(true);剥夺父view 对touch 事件的处理权,谁用谁知道. 2.ArgbEvaluator. ...