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

Swift初体验之HelloWord+苹果Swift编程语言新手教程【中文版】的更多相关文章

  1. Swift开发实例:苹果Swift编程语言新手教程中文版+FlappyBird,2048游戏源代码

    源代码: 用IOS Swift语言实现的Flappy Bird源代码:http://download.csdn.net/detail/estellise/7449547 用IOS Swift实现的游戏 ...

  2. 苹果Swift编程语言新手教程【中国版】

    Swift代码语言教程:在刚刚过去的WWDC2014大会上,苹果公司新公布了一种编程语言Swift.据悉.Swift语言继承了C语言以及Objective-C的特性,且克服了C语言的兼容性问题.对于广 ...

  3. swift编程语言基础教程 中文版

    swift编程语言基础教程 中文版 http://download.csdn.net/detail/u014036026/7845491

  4. Swift初体验(两)

    // 写功能初体验 func getMyName(firstName first:String, lastName last:String) -> String{ //return first ...

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

    文件夹 1 简单介绍 2 Swift入门 3 简单值 4 控制流 5 函数与闭包 6 对象与类 7 枚举与结构 1 简单介绍 Swift是供iOS和OS X应用编程的新编程语言,基于C和Objecti ...

  6. swift初体验

    swift是一门类型安全的语言,同样也是基于c语言 那么c语言的一些类型也是实用的,不同的是:swift声明变量和常量是不一样的 let:用来修饰常量:var用来修饰变量 e.g: let num=1 ...

  7. Swift初体验之图案锁

    这篇在应用上貌似没有价值,貌似我写了好多实际上都没有价值,这里贴出来就是分享下. 自己写swift好多天了,感觉好多东西还是不太懂,边学边做,互勉! 先上图: 代码:下载

  8. Swift初体验(三)

    /*******************************************************************************/ // 协议 protocol Des ...

  9. Swift初体验 (一)

    // 声明一个常量 let maxNumberOfStudents: Int = 47 // 声明一个变量,假设没有在声明的时候初始化,须要显示的标注其类型 var currentNumberOfSt ...

随机推荐

  1. uva10366 Faucet Flow

    每次找到两边离中心最高的板,如果等,再找外围的最高版...画图便于理解两边先找到距离(-1,1)最近的最大值L和R,因为可能存在多个最高的挡板.接着比较两个L和R的大小,相等的话分别分析两边,取最小值 ...

  2. docker 深入理解之namespace

    namespace 名称空间 docker容器主要通过资源隔离来实现的,应该具有的6种资源隔 namespace 的六项隔离 namespace 系统调用参数 隔离的内容 UTS CLONE_NEWU ...

  3. Linux常用命令大全3

    linux命令1,关机shutdown -h now2,init 0 关闭系统3,shutdown -h hours:minutes &按预定时间关闭系统4,shutdown -c取消按预定时 ...

  4. OI Journal

    佛系更新,哪天想起来就写点. 10.11 班主任硬灌的鸡汤真香 qtmd,简直就是硬扯,说怎么怎么着说不定就能多拿一分两分,一分两分就能割掉好多人 ......螺旋懵圈状,我表示硬憋着不笑 HIAHI ...

  5. PHP基于phpqrcode类生成二维码的方法详解

    前期准备: 1.phpqrcode类文件下载,下载地址:https://sourceforge.net/projects/phpqrcode/2.PHP环境必须开启支持GD2扩展库支持(一般情况下都是 ...

  6. 15. PARTITIONS

    15. PARTITIONS PARTITIONS表提供有关表分区的信息. 此表中的每一行对应于分区表的单个分区或子分区. 有关分区表的更多信息,请参见分区. PARTITIONS表有以下列: TAB ...

  7. awk中RS,ORS,FS,OFS区别与联系

    学习awk时,一定要记得动手去实践,只有在实践中才能发现问题,以下就我在学习中和实践中的经验,总结一下RS,ORS,FS,OFS的区别和联系. 一.OS和ORS 1.RS是记录分隔符,默认的分隔符是\ ...

  8. 命令行可以执行python脚本,jenkins里执行报错:cannot find Chrome binary

    “selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary”这个 ...

  9. pycharm运行没问题,但是在命令行执行就报错

    因为python并不知道你那个叫demo的package在哪里.你需要手动把project的完整路径添加到PYTHONPATH这个环境变量中.pycharm执行项目中的文件时会自动帮你做这件事,所以你 ...

  10. Leetcode 283.移动零

    移动零 给定一个数组 nums,编写一个函数将所有 0 移动到数组的末尾,同时保持非零元素的相对顺序. 示例: 输入: [0,1,0,3,12] 输出: [1,3,12,0,0] 说明: 必须在原数组 ...