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>,是前一天晚上才定的,中午花了半小时准备了下 ...
随机推荐
- 新找到的一款字体 fantasque-sans-mono
http://www.ipreferjim.com/2015/03/your-ides-font-matters-fantasque-sans-mono/
- Jmeter监控服务器性能
JMeter是一款压力测试工具,我们也可以用它来监控服务器资源使用情况.JMeter正常自带可以通过Tomcat的/manager/status来监控服务资源使用情况.这种情况只能监控Tomcat支持 ...
- Oracle 查看表空间的大小
SELECT SUM(bytes) / (1024 * 1024) AS free_space, tablespace_name FROM dba_free_space GROUP BY tables ...
- java小程序 示例
乘法表: package com.test; import org.junit.Test; public class TestSwitch { @Test public void test() { f ...
- CodeForces 593D【树链剖分】
题意: 给你n个点和n-1条边组成的一棵树,按顺序给出数的每一条边. 询问m次,每次给出一个x求x除以从点a到点b所有边的权值和的乘积,还有修改,给出边的编号,修改某条边的权值. 思路: 树链剖分,用 ...
- (转)Log4net 配置类库
原文地址:http://blog.csdn.net/pfe_nova/article/details/20072137 1.单文件日志 对于单文件的日志,封装代码如下: public enum Log ...
- mysql 使用说明-2
3.3.4 Retrieving Information from a Table Select 命令从表格中取回信息 SELECT what_to_select FROM which_table W ...
- 菜鸟-手把手教你把Acegi应用到实际项目中(6)
在企业应用中,用户的用户名.密码和角色等信息一般存放在RDBMS(关系数据库)中.前面几节我们采用的是InMemoryDaoImpl,即基于内存的存放方式.这节我们将采用RDBMS存储用户信息. Us ...
- 最小生成树之prim
prim是设置一个初始结点,寻找其周围最小的边权值,并将该结点作为初始结点,继续寻找现在结点周围的边权值的最小值,但要注意如果这次寻找的某个边权值没有上次的小的话仍然保留上一次的边权值,即lowcas ...
- SICP 换零钱的迭代版本
看到换零钱方式统计这里, 书中给出了递归的实现但没有给出迭代版本说要留给读者作为挑战, 既然说是作为挑战那肯定是能解决的,在想了一天无果之后最终在别人博客的帮助下终于实现了迭代的版本...也算是经历坎 ...