newlinedotco / FlappySwift

swift implementation of flappy bird. More at fullstackedu.com

Home Page:https://www.fullstackedu.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error in GameScene.swift

lhlpasser opened this issue · comments

/FlappySwift-master/FlappyBird/GameScene.swift:206:19: Overriding method with selector 'touchesBegan:withEvent:' has incompatible type '(NSSet, UIEvent) -> ()'

issue fixed.

override func touchesBegan(touches: Set, withEvent event: UIEvent) {....}

FlappyBird/GameScene.swift:206:41: Reference to generic type 'Set' requires arguments in <...>
I get this error when I replace the code line

You have to tell Swift what the Set type is. In this case, I think it's just Set<AnyObject>.

Edit: nope, it's Set<NSObject>.

It was indeed expecting Set thanks :)
But now i've got an error In AppDelegate.swift with the function didFinishLaunchingWithOption.. I believe it expects something more.

Edit: I Just deleted the function to resolve it ^^

@azpery how did u solve this issue? i still have error as "FlappyBird/GameScene.swift:206:41: Reference to generic type 'Set' requires arguments in <...>"

You have to tell what type the Set is :

Set<NSObject>

Fixed in 4e94e7b and friends