I have a velocity ivar defined as a CGPoint.
I need to somehow extract just the ‘x’ value of velocity, and then use this to call-send a message to the following method signature
-(void) adjustTimer:(NSTimeInterval*)newInterval
How do I obtain just the ‘x’ value of a CGPoint?
Do I then need to convert or cast this result before calling my adjustTimer method?
This should do it:
Note that
NSTimeIntervalis a double and x is a CGFloat, so it’s not safe to pass a direct pointer to your x value.