※当サイトではアフィリエイト広告を利用しています

swift1.2でのエラー

swift

swift1.2でのエラー

xcode6.3へupdateするとswiftのバージョンも1.2へupdateされる。

一部文法が異なるため、エラーが出たのでその対処

override func touchesBegan(touches: NSSet, withEvent event: UIEvent)

→ override func touchesBegan(touches: Set<NSObject>, withEvent event: UIEvent)

 let touch = touches.anyObject() as UITouch?

→ let touch = touches.first as? UITouch

 

コメント

タイトルとURLをコピーしました