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>,是前一天晚上才定的,中午花了半小时准备了下 ...
随机推荐
- (转)关于rdlc报表的数据源
rdlc 报表字符类数据分为文本数据和表数据,区别就在于文本数据只有一个,表数据可以有多行,然而有很多数据只需要一个传入就可以比如打印某个用户的基本信息,很多信息都是唯一的,如果此时报表传入的数据 ...
- oracle 11g 服务端下载地址及安装说明
oracle 11g 服务端下载地址及安装说明 分类: Oracle 2013-11-17 19:40 988人阅读 ...
- requestDisallowInterceptTouchEvent
ViewPager来实现左右滑动切换tab,如果tab的某一项中嵌入了水平可滑动的View就会让你有些不爽,比如想滑动tab项中的可水平滑动的控件,却导致tab切换. 因为Android事件机制是从父 ...
- Ubuntu Qt arm-linux-androideabi-gcc: Command not found
:-1: error: /opt/Qt/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86/bin/arm- ...
- 《Head First 设计模式》ch.1 策略(Strategy)模式
策略模式 定义了算法族,分别封装起来,让它们可以互相替换,让算法的变化独立于使用算法的客户. 模式名词的意义 威力强大,交流的不止是模式名称,而是一整套模式背后所象征的质量.特性.约束 用更少的词汇做 ...
- The Ninth Hunan Collegiate Programming Contest (2013) Problem A
Problem A Almost Palindrome Given a line of text, find the longest almost-palindrome substring. A st ...
- Fegla and the Bed Bugs 二分
Fegla and the Bed Bugs Fegla, also known as mmaw, is coaching a lot of teams. All these teams train ...
- TchApp项目说明
概述 使用Web做UI,csharp编程,构建跨平台桌面软件,项目目标是打造一个框架,做完相关的基础设施,让使用者能够只关注业务开发,而不需要重新构建基础设施. 项目应该包括:窗口管理API,跨语言( ...
- 用github pages展示你的静态网页,多项目支持
我看到有分享用github pages来做博客的,不过我并不想挂博客在上面,我只是想将我的一些作品挂上去,然后链接到我的简历里,这样HR可以直接看到. 首先是最基本的操作,在github上创建一个新的 ...
- emacs org mode 中的标签全参考
把交叉的信息关联起来的最好的方式就是打标签. emacs 的 org 模式对标签的支持非常强大. 每一个标题都可以在最后包含标签列表.标签由字母.数字.'_' 和 '@' 组成.标签的前后必需有一个冒 ...