Fast CGFloat for int xcode 6 beta 4
var w:Int = Int(self.bounds.size.width / Float(worldSize.width))
var h:Int = Int(self.bounds.size.height / Float(worldSize.height))
Error: 'CGFloat does not convert to UInt8'
I researched this type of conversion and I found this Convert Float to Int in Swift my code like this but no idea working?
+3
source to share