swift 学习笔记
来源:互联网 发布:winxp系统修复软件 编辑:程序博客网 时间:2024/06/09 21:15
第一个swift app project
ViewController.swift
//// ViewController.swift// MyFirstApp//// Created by hins on 16/3/26.// Copyright © 2016年 hins. All rights reserved.//import UIKitclass ViewController: UIViewController { @IBAction func TouchMe(sender: UIButton) { //print("hello app");//点击文字事件时控制台输出 // 弹窗 let msgBox = UIAlertController(title: "this is title", message: "this is content", preferredStyle: UIAlertControllerStyle.Alert); //弹窗里的按钮 //let msgAction = UIAlertAction(title: "confirm", style: UIAlertActionStyle.Default) { (_) in} let msgAction = UIAlertAction(title: "confirm", style: UIAlertActionStyle.Default) { (_) in print("you touch button!")} msgBox.addAction(msgAction); self.presentViewController(msgBox, animated: true, completion: nil); } override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. }}
1 0
- Swift学习笔记--关于Swift
- Swift学习笔记--Swift入门
- OpenStack Swift学习笔记
- Swift学习笔记-1
- Swift学习笔记
- Swift学习笔记
- SWIFT学习笔记01
- SWIFT学习笔记02
- SWIFT学习笔记03
- SWIFT学习笔记04
- SWIFT学习笔记05
- swift学习笔记
- swift学习笔记
- swift学习笔记2
- swift语言学习笔记
- Swift学习笔记
- Swift学习笔记-UI
- Swift学习笔记一
- 1008 - Fibsieve`s Fantabulous Birthday (lightoj)
- 一、web基础
- GCD
- hadoop 安装配置 Ubuntu 14.04server
- 为pycharm修改Theme & Color
- swift 学习笔记
- 二、Tomcat
- 生成验证码
- 关于Adapter和ViewHolder的另类写法
- JAVA基础1 数组与方法
- 69. Sqrt(x)
- [面试] 算法(三) —— 有序二维数组的查找
- Leetcode Sudoku Solver My Submissions Question
- Android SingleTask跨任务栈调用