title: Cross-platform NSValue category
body: <p>I am trying to create a cross-platform NSValue category that will handle CGPoint/NSPoint and CGSize/NSSize etc, for Cocoa and iOS.</p>
  
  <p>I have this:</p>
  
  <pre><code>#ifdef __MAC_OS_X_VERSION_MAX_ALLOWED
  // Mac OSX
  
  + (NSValue *) storePoint:(NSPoint)point {
    return [NSValue valueWithPoint:point];
  }
  
  + (NSPoint) getPoint {
    return (NSPoint)[self pointValue];
  }
  
  
  #else
  // iOS
  
  + (NSValue *) storePoint:(CGPoint)point {
    return [NSValue valueWithCGPoint:point];
  }
  
  + (CGPoint) getPoint {
    return (CGPoint)[self CGPointValue];
  }
  
  
  #endif
  </code></pre>
  
  <p>The Mac part works perfectly but the iOS part gives me an error on </p>
  
  <pre><code>  return (CGPoint)[self CGPointValue];
  </code></pre>
  
  <p>with two messages: 1) no known class method for selector CGPointValue and  "used type CGPoint (aka struct CGPoint) where arithmetic or pointer type is required.</p>
  
  <p>why is that?</p>