4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Xcode6.3、Swift1.2での変更点

Posted at

swiftの勉強にネットにアップされているサンプルコードを写経してる時にエラーになる。
調べてみたら変更点があった。
自分用にまとめる
myDevice = device as! AVCaptureDevice
「as」→「as!」
びっくりマークが必要になりました。

override func touchesMoved(touches: Set<NSObject>, withEvent event: UIEvent) {
    
        // タッチイベントを取得.
        let aTouch = touches.first as! UITouch
}

「touches.object」→「touches.first」に変更

そのほかにもありますが引数が違うとエラーを吐かれた場合は一度Xcodeで入力補助を使いながら確認した方がいいみたい。

4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?