swift1.2でError: Set doesn't have the method anyObject()
swift1.2が発表されて早速Xcode6.3を使ってみるとタイトルのエラーが出た。
以下のコードだとだめらしい。
let touch = event.allTouches()?.anyObject() as UITouch
こう書き直すと動いた。
let touch = event.allTouches()?.first as? UITouch
swift1.2が発表されて早速Xcode6.3を使ってみるとタイトルのエラーが出た。
以下のコードだとだめらしい。
let touch = event.allTouches()?.anyObject() as UITouch
こう書き直すと動いた。
let touch = event.allTouches()?.first as? UITouch