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. Java:过去、未来的互联网编程之王

    Java对你而言是什么?一门你大学里学过的语言?一个IT行业的通用语言?你相信Java已经为下一次互联网爆炸做好了准备么?Java 一方面为嵌入式计算做了增强,而另一方面为实时应用做了精简,本文将介绍 ...

  2. DedeTag Engine Create File False提示的种种原因及解决方法

    DedeTag Engine Create File False提示的种种原因及解决方法 第一种情况:站点.文件夹权限不足造成无法建立文件 这种情况的出现,一方面可能是Apache设置的读写权限较严格 ...

  3. Oracle中的约束

    非空约束 NOT NULL 数据库表中的某一个列不能为空 唯一约束 UNIQUE 表中某一个列不允许重复 唯一约束所在列可以为NULL,但只能出现一次 代码: CREATE TABLE MEMBER ...

  4. ubuntu 14.10 安装 zabbix

    在ubuntu 14.10 上部署 zabbix 2.x 基本软件包安装 既然是ubuntu系统,当然要用好apt-get神器. 参考教程 URL:http://blog.csdn.net/cloud ...

  5. 如何正确地使用Python的属性和描述符

    关于@property装饰器 在Python中我们使用@property装饰器来把对函数的调用伪装成对属性的访问. 那么为什么要这样做呢?因为@property让我们将自定义的代码同变量的访问/设定联 ...

  6. @Valid springMVC bean校验不起作用

    @RequestMapping("/add2") public String addStudentValid(@Valid @ModelAttribute("s" ...

  7. SparkSQL使用之如何使用UDF

    使用java开发一个helloworld级别UDF,打包成udf.jar,存放在/home/hadoop/lib下,代码如下: package com.luogankun.udf; import or ...

  8. JSP SQL注入--破法

    1.JS验证拦截 <%@ page language="java" import="java.util.*" pageEncoding="UTF ...

  9. Grunt - Karma 单元测试

    Karma 是 Goolge 开源的一个 Test runner, 可以配合 Grunt 使用. 1. 相关插件介绍 1.1 Karma 的官网 http://karma-runner.github. ...

  10. VIM安装 NERDTREE,SOLARIZED 插件

    实验系统版本及VIM版本 系统:CentOS6.3 VIM:7.2 插件介绍 (附上一张效果图) nerdtree(在窗口左侧用于浏览目录结构的插件) solarized(一个自己认为比较护眼的vim ...