I have a CGPoint
declared in a UIView
class, in my viewController
I try to check if that CGPoint
is not equal to CGPointZero
, but I get this error:Invalid operands to binary expression ('CGPoint' (aka 'struct CGPoint') and 'CGPoint')
This is the if-statement:
if (joystick.velocity != CGPointZero)
The error points to the != and I dont know why it gives me an error.
joystick
is the UIView
class, CGPoint velocity
is declared like this:
@property(nonatomic) CGPoint velocity;