Alex Rivera | Logout

Converting a CGPoint to NSValue

Asked 2009-04-21T14:52:28.393
19

In CABasicAnimation.fromValue I want to convert a CGPoint to a "class" so I used NSValue valueWithPoint but in device mode or simulator one is not working... need to use NSMakePoint or CGPointMake if in device or simulator.

Edit
Report

1 Answer

1

&(cgpoint) -> get a reference (address) to cgpoint (NSPoint *)&(cgpoint) -> casts that reference to an NSPoint pointer *(NSPoint )(cgpoint) -> dereferences that NSPoint pointer to return an NSPoint to make the return type happy

answered 2011-05-04T21:56:59.803

Your Answer