swift開發:試玩 Apple 網站的 playground

https://developer.apple.com/library/prerelease/ios/documentation/swift/conceptual/swift_programming_language/GuidedTour.html


點擊圖片中的:


Open Playground

下載代碼解壓縮



雙擊上面的圖標,系統會打開 Xcode 6 beta



修改42 爲32,右側的結果馬上就變成 32了。。。

神奇。


發現:項目目錄下有個文件



contents.xcplayground



打開一看,牛大了:


?

1
2
3
4
5
6
<?xmlversion="1.0"encoding="UTF-8"standalone="yes"?>
<playgroundversion='3.0'sdk='macosx'allows-reset='YES'>
    <sections>
        <documentationrelative-path='section-1.html'/>
        <documentationrelative-path='section-2.html'/>
        <codesource-file-name='section-3.swift'/>


 

文檔和 代碼混合顯示。。。


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章