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)
}
Summarize code for the three presentation experiments的更多相关文章
- 如何在 VS Code 中搭建 Qt 开发环境
前言 VS Code 高大上的界面.强大的智能联想和庞大的插件市场,着实让人对他爱不释手.虽然可以更改 Qt Creator 的主题,但是 Qt Creator 的代码体验实在差劲.下面就来看看如何在 ...
- 关于Go,你可能不注意的7件事(转的)
http://tonybai.com/2015/09/17/7-things-you-may-not-pay-attation-to-in-go/ code https://github.com/bi ...
- Top 10 Programming Fonts
Top 10 Programming Fonts Sunday, 17 May 2009 • Permalink Update: This post was written back in 2009, ...
- py-faster-rcnn代码阅读2-config.py
简介 该文件指定了用于fast rcnn训练的默认config选项,不能随意更改,如需更改,应当用yaml再写一个config_file,然后使用cfg_from_file(filename)导入以 ...
- keynote代码高亮【转】
码农即使做ppt,也离不开代码,在keynote下,如果要粘贴代码,如何做到语法高亮呢? 补充1,该功能由pygments提供支持,所以支持的语言见:http://pygments.org/langu ...
- 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 ...
- 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 ...
- [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 ...
- 从Script到Code Blocks、Code Behind到MVC、MVP、MVVM
刚过去的周五(3-14)例行地主持了技术会议,主题正好是<UI层的设计模式——从Script.Code Behind到MVC.MVP.MVVM>,是前一天晚上才定的,中午花了半小时准备了下 ...
随机推荐
- android 插件化 模块化开发
http://blog.csdn.net/o1587790525/article/details/11891997 Android 插件化架构设计 http://www.iqiyi.com/w_19 ...
- sikuli实例
代码: package selenium.sikuli; import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; im ...
- jQuery formValidator表单验证插件常见问题
1. 如何实现一个控件,根据不同的情况,实现不同的控制? 2. 一个页面上我有几个tab页,如何实现每个Tab页上的控件单独校验? 3. 我采用的页面上文字问题的方式,点提交的时候, ...
- ubuntu 命令行软件包管理
安装软件包 apt-get install vim 卸载 apt-get remove/autoremove vim autoremove 会顺便卸载未使用,未被依赖的软件包 查询或者搜索软件包:: ...
- glctx.ClearColor 参数说明
glctx.ClearColor 的参数信息如下: // ClearColor specifies the RGBA values used to clear color buffers. // // ...
- 在Eclipse ee中成功使用jQuery UI插件
关键代码截图如下:
- [HDU 4417] Super Mario (树状数组)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4417 题目大意:给你n个数,下标为0到n-1,m个查询,问查询区间[l,r]之间小于等于x的数有多少个 ...
- [POJ 3211] Washing Clothes (动态规划)
题目链接:http://poj.org/problem?id=3211 题意:有M件衣服,每种衣服有一种颜色,一共有N种颜色.现在两个人洗衣服,规则是必须把这一种颜色的衣服全部洗完才能去洗下一种颜色的 ...
- PHP 文件读取 fread、fgets、fgetc、file_get_contents 与 file 函数
fread().fgets().fgetc().file_get_contents() 与 file() 函数用于从文件中读取内容. fread() fread() 函数用于读取文件(可安全用于二进制 ...
- DPdao
hrbust1053 http://acm.hrbust.edu.cn/index.php?m=ProblemSet&a=showProblem&problem_id=1053 #in ...