I have the follow code:
func CGPointFromGLKVector2(vector : GLKVector2) -> CGPoint {
return CGPointMake(vector.x, vector.y)
}
The error message is:
Use of undeclared type 'CGPoint'
After I import SpriteKit, I got:
Use of module 'GLKVector2' as a type
What should I do next? I can't find any related information in document. Thanks
NOTE:
I actually want to covert the following function C(objC) code into Swift:
static __inline__ CGPoint CGPointFromGLKVector2(GLKVector2 vector) {
return CGPointMake(vector.x, vector.y);
}