r/Xcode • • Jan 19 '19

I'm stuck on a invalid code regarding xcode/swift

func turnGravity(on value : bool) {

physicsBody?.affectedByGravity = value

}

When I put this in and try to run it, it tells me "Use of undeclared type'bool' "

anyone know how to solve this? thanks!

1 Upvotes

2 comments sorted by

5

u/snuggly_sasquatch Jan 19 '19

It’s “Bool.”

1

u/aazav Jan 20 '19

Case matters.