when I try to build the game(page 97), I get the error in MyUtils.swift, Use of undeclared type ‘CGFLoat’ from this code:
extension CGFloat {
static func random() → CGFloat {
return CGFloat(Float(arc4random()) / Float(UInt32.max))
}
static func random(min: CGFloat, max: CGFloat) → CGFloat{
assert (min < max)
return CGFloat.random() * (max - min) + min
}
I read articles from searching on google, and you have to import UIKit. It works with no problem when I added the import UIKIt. Importing SpriteKit works too!