Reputation: 109
I get a whole bunch of errors when I updated Xcode to 6.3 and I fixed most of them except for this one. What am I doing wrong? Thank you!
<NSObject> does not have a member named anyObject
var touch: UITouch = touches.anyObject() as! UITouch
Upvotes: 2
Views: 718
Reputation: 437382
It's now using Set<NSObject>
, so you don't have anyObject
anymore. But you can just grab the first item quite easily:
let touch = touches.first as! UITouch
Upvotes: 3