山姆的編程實作分享。。。

Sam Blog, Sam Sharing, Sam Studio

2014年9月4日

Swift Programming – File difference between Objective-C and Swift


Continue Swift Programming- Hello Swift , we create a "Hello Objective-C" Application to compare the difference between Swift and Objective-C

Below is Objective-C Application file structure

Below is Swift Application file structure



The differences have
1. No header file (*.h)
2. the C file (*.m) has changed to Swift file (*.swift)


Swift Programming - Hello Swift


Step1: Install Xcode 6 beta from Apple Developer site
             Xcode 6 Beta version

Step2: Create new project with "Swift" language


   Select Single View Application 



   Select "Swift" language


Step3: Add a label - "Hello Swift" into storyboard


Step4: Build and Run App on Simulator


All steps are almost same as Objective-C development flow except step3, select "Swift" language.

2014年9月1日

My MacBook Pro


Received My Macbook Pro today, YA!


Now I have iMac, MacBook Pro and many iPads...

2014年8月21日

2014年8月13日

Swift Programming – Resource



Apple Swift 官網 :
https://developer.apple.com/swift/

Apple Swift Blog :
https://developer.apple.com/swift/blog/

Xcode 6 beta version download :
https://developer.apple.com/swift/resources/

Swift presentation, Docs and Sample code :
https://developer.apple.com/swift/resources/

The Swift Programming Language 中文翻譯版本 :
http://tommy60703.gitbooks.io/swift-language-traditional-chinese/



2014年7月17日

2014年7月9日

Learning Cocos2D - Install Cocos2D and make first Cocos2D project


Step1:  Download Cocos2D installer from below link

              http://www.cocos2d-swift.org/get-started

Step2: After installed Cocos2D framework, the Cocos2D template will exist in Xcode.
Press File -> New -> Project.., you will see below figure


Step3: Like iOS first simplest application - Hello World; You can follow step4 - Step7 to create your first Cocos2D application without input any code, just using Cocos2D template.

Step4: Continues Step2, select cocos2d as template then press "Next"

Step5: Input Product/Project Name as you want, here i input CCHelloWorld.

Step6: Select project folder then press "Create", the Cocos2D Hello World project will be created as below


Step7: Press "RUN"

Step8: Below pictures are the Cocos2D Hello World screen shot



熱門文章