title: Attract two masses to each other w/ UIKit Dynamics
body: <p>Is there any way to attract two masses to each other as if in free space using <strong>UIKit Dynamics</strong>?</p>
  
  <p>I know by default the gravity behaviour acts as if the gravity is pointing down to the earth. But this seems only useful for a small class of behaviours. The only way I can think of doing this is by giving the two items huge mass and no initial gravity vector (but applying the <code>UIGravityBehavior</code> to them, errrr adding them to the <code>UIGravityBehavior</code>? hah).</p>
  
  <pre><code>self.animator = [[UIDynamicAnimator alloc] initWithReferenceView:self.view];    
  
  //first item with heavy mass.
  self.dynamic = [[UIDynamicItemBehavior alloc] initWithItems:@[self.heavyCircle]];
  self.dynamic.density = 1000000000;
  
  self.gravity = [[UIGravityBehavior alloc] initWithItems:@[self.heavyCircle]];
  self.gravity.gravityDirection = CGVectorMake(0, 0);
  
  [self.animator addBehavior:self.gravity];
  [self.animator addBehavior:self.dynamic];    
  
  //second item with less mass
  self.dynamic = [[UIDynamicItemBehavior alloc] initWithItems:@[self.smallCircle]];
  self.dynamic.density = 10;
  //also tried with a huge value here as well. 
  //HUGE_VALF seems to make the app choke
  
  
  
  self.gravity = [[UIGravityBehavior alloc] initWithItems:@[self.smallCircle]];
  self.gravity.gravityDirection = CGVectorMake(0, 0);
  
  [self.animator addBehavior:self.gravity];
  [self.animator addBehavior:self.dynamic];
  </code></pre>
  
  <p>But this doesn't do anything at all. :/ I was all excited about the physics in UIKit Dynamics and I'm hoping this type of behaviour is possible.</p>
  
  <p>If this is not possible with UIKit Dynamics, is there another way that is equally integrated (retaining interactivity, and functions as a <code>UIView</code>/<code>Button</code>/Whatever)? Sprite Kit?</p>
  
  <p>Thanks for any help!</p>