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>,是前一天晚上才定的,中午花了半小时准备了下 ...
随机推荐
- expdp impdp终极教学
源地址:http://blog.csdn.net/giianhui/article/details/7788550
- [Flex] Accordion系列 - Header图标的设置
<?xml version="1.0" encoding="utf-8"?> <!--Flex中如何通过getHeaderAt()函数以及se ...
- [JS]以下是JS省市联动菜单代码
以下是JS省市联动菜单代码: 代码一: <html> <head> <title></title> <script language=" ...
- (medium)LeetCode 227.Basic Calculator II
Implement a basic calculator to evaluate a simple expression string. The expression string contains ...
- cocos2d-x 利用CCLabelTTF制作文字描边与阴影效果的实现方法
// // myttf.h// // Created by 王天宇 on 14-6-12. // // #ifndef ____SLG__myttf__ #define ____SLG__myttf_ ...
- 打印从1到最大的n位数
//和剑指offer程序基本一致,不过print和进位两部分合并在一个程序中 //如果把其分拆,进行适当的整理,代码会更加整洁 void PrintToMaxOfDigitsN(int n) { ) ...
- Linux下配置xampp
How do I install XAMPP?Choose your flavor for your linux OS, the 32-bit or 64-bit version. Change th ...
- maven skip tests
DskipTests=true is short form of -Dmaven.test.skip=true
- java内省机制Introspector
访问JavaBean属性的两种方式 1)直接调用bean的setXXX或getXXX方法: 2)通过内省技术访问(java.beans包提供了内省的API),内省技术访问也提供了两种方式: a)通过P ...
- MFC学习 文件操作注册表操作
c读写文件 void CFileView::OnRead() { FILE *pFile = fopen("1.txt", "r"); /*char ch[10 ...