Swift 1.2 への変換


<Swift1.1>

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

var touch = touches.anyObject() as UITouch

}


は以下のように変換。


<Swift1.2>

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

var touch = touches.first asUITouch

}