仔细思考Swift

1.SWIFT链接code和Storyboard

  链接code和storyboard之前,需要给storyboard的View定义Class

  一个ViewController对应一个storyboard的View

 2.选择View的时候注意左边

 

 

3.Xcode6.1 !

thats because the videos are using xcode 6, not xcode 6.1. Some things in swift have changed in 6.1. you probably need to force unwrap the NSURL variable by placing a bang (!) after the variable name

"!"问题的问题的解决方案

4.非同期処理の実行
Playgroundでは、そのままでは同期処理しか実行出来ませんが、「XCPSetExecutionShouldContinueIndefinitely(continueIndefinitely: Bool)」でtrueを設定することにより、非同期処理の実行も行えるようになります。

 

posted @ 2015-04-19 13:54  yth2004  阅读(135)  评论(0编辑  收藏  举报