AppDelegate.swift :

<span style="font-size:24px;"><strong>//
// AppDelegate.swift
// SwiftHelloWord
//
// Created by jason on 14-6-5.
// Copyright (c) 2014年 JasonApp. All rights reserved.
// import UIKit @UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary? ) -> Bool {
// Override point for customization after application launch.
return true
} func applicationWillResignActive(application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
} func applicationDidEnterBackground(application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
} func applicationWillEnterForeground(application: UIApplication) {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
} func applicationDidBecomeActive(application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
} func applicationWillTerminate(application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
} }
</strong></span>





ViewController.swift :



<span style="font-size:24px;"><strong>//
// ViewController.swift
// SwiftHelloWord
//
// Created by jason on 14-6-5.
// Copyright (c) 2014年 JasonApp. All rights reserved.
// import UIKit class ViewController: UIViewController { @IBOutlet var swiftLabel : UILabel override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
} @IBAction func swiftButtonPressed(sender : UIButton) { } override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
} }
</strong></span>





Main.storyboard:





下载:

苹果Swift编程语言新手教程【中文版】.pdf

最新文章

  1. vtkTransform实例 1
  2. apk反编译工具
  3. 网页中tab标签切换分别用jquery和javascript源码实现
  4. 【翻译】ASP.NET MVC 5属性路由(转)
  5. CODEVS 3145 汉诺塔游戏 递归
  6. js构建工具和预编译
  7. 《Prism 5.0源码走读》Prism 5.0简介
  8. TCP/IP协议栈及OSI参考模型详解
  9. Wix#可以直接写C#代码来生成Wix的MSI安装文
  10. [Mime] MimeHeaders--MimeHeader帮助类 (转载)
  11. bzoj 2115: [Wc2011] Xor xor高斯消元
  12. linux c 之signal 和sigaction区别
  13. vim常用指令一览
  14. jvm的内存区域简介
  15. BinDiff安装使用教程
  16. 排序函数 sort() 和 高阶函数sorted()
  17. Tomcat的三种部署方式
  18. mascara-1
  19. java 中的闭包
  20. vs2010打包安装

热门文章

  1. python 网络编程篇
  2. uva10570 Meeting with Aliens
  3. window.onload和DOMContentLoaded的区别
  4. Session/EntityManager is closed
  5. qcloudsms_py
  6. luogu 1113 杂务--啥?最长路?抱歉,我不会
  7. POJ-1328-放置雷达
  8. IDEA下maven工程的classpath
  9. 在cmd 命令中 用cd E:\ 进入不了E盘 问题
  10. Django框架基础知识05-自定义模板标签与过滤器