title: Assigning to 'CGPoint' (aka 'struct CGPoint') from incompatible type 'id'
body: <p>I have an <code>NSMutableArray</code> with <code>CGPoint</code>. When I try to add an object to my <code>CGPoint</code> variable I see this error:</p>
  
  <blockquote>
    <p><strong>Assigning to 'CGPoint' (aka 'struct CGPoint') from incompatible type 'id'</strong></p>
  </blockquote>
  
  <p>Here's my code:</p>
  
  <pre><code>targetView.center = [arrayWithCoord objectAtIndex:1];
  </code></pre>
  
  <p>I tried the way Xcode suggests:</p>
  
  <pre><code>targetView.center = *((__bridge CGPoint *)([arrayWithCoord objectAtIndex:1]));
  </code></pre>
  
  <p>I also tried this:</p>
  
  <pre><code>targetView.center = ((NSValue *)arrayWithCoord[0]).CGPointValue;
  </code></pre>
  
  <p>In all cases I have <code>targetView.center = {0 , 0}</code>.</p>
  
  <p>I am absolutely sure that the array isn't empty. See my <code>NSLog</code>s:</p>
  
  <blockquote>
    <p>2016-08-17 00:41:40.760 newword[16497:819894] Element NSPoint: {154.5,
    31}</p>
    
    <p>2016-08-17 00:41:40.760 newword[16497:819894] Element NSPoint: {197.5,
    31}</p>
    
    <p>2016-08-17 00:41:40.760 newword[16497:819894] Element NSPoint: {240.5,
    31}</p>
    
    <p>2016-08-17 00:41:40.761 newword[16497:819894] target center result {0,
    0}</p>
  </blockquote>
  
  <p>Thanks for any help! </p>