Just My Life & My Work

[Swift] Xcode 6 beta 初體驗

實在迫不及待想要玩Apple發佈的新程式語言「Swift」,就如同Swift的意思是「迅速」,開發者當然也要有著想要迅速學習成長的心,於是在付費開發者帳號中下載Xcode 6 beta來把玩一下~

由於黑皮棉MacBook Air只有70GB(50GB割給Windows 7),所以只好花時間挪出6GB以上的空間來安裝Xcode 6 beta~

Xcode 6 beta



 Theme: Xcode 6 beta with Swift
 IDE: Xcode 5
 Language: Swift
 Date: 103/06/07
 Author: HappyMan
 Blog: https://cg2010studio.wordpress.com/

import UIKit

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:.

import UIKit

class ViewController: UIViewController {

    override func viewDidLoad() {
        // Do any additional setup after loading the view, typically from a nib.

    override func didReceiveMemoryWarning() {
        // Dispose of any resources that can be recreated.



Xcode 6 beta xib


Xcode 6 beta run



蘋果軟體工程副總裁Craig Federighi表示,蘋果希望以Swift來取代Objective-C與Python等程式語言。」雖然不知道要經過幾年的時間,不過還是趁早學會Swift吧!也期望自己coding能力可以更快(學習成長)狠(瞄準目標)準(豐富收獲)




WordPress.com 標誌

您的留言將使用 WordPress.com 帳號。 登出 /  變更 )

Google photo

您的留言將使用 Google 帳號。 登出 /  變更 )

Twitter picture

您的留言將使用 Twitter 帳號。 登出 /  變更 )


您的留言將使用 Facebook 帳號。 登出 /  變更 )

連結到 %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.


%d 位部落客按了讚: