title: Detecting intersection of two UIView objects at different superview
body: <p>I've got a problem with detecting intersection of my <code>UIView</code> objects.</p>
  
  <p>That's what I have used below:</p>
  
  <p>For intersection two object I need to figure out how to translate one coordinates system from first superview to another coordinates system.</p>
  
  <p>I've used this approach: <code>- (CGRect)convertRect:(CGRect)rect fromView:(UIView *)view</code> described here <a href="http://developer.apple.com/library/ios/#documentation/uikit/reference/uiview_class/uiview/uiview.html" rel="noreferrer">link</a>.</p>
  
  <p>As I know it is very simple to use this method. But in the different cases it is hard due a little description in documentation (but maybe just for me).</p>
  
  <p>This is my structure of subviews that is shown on image below. I have already got all methods for drag and drop object. But I need to figure out how to get intersection for <code>UIView</code> <strong>A</strong> and <code>UIView</code> <strong>B</strong>. Thanks for help.</p>
  
  <p><img src="https://i.stack.imgur.com/f4Cqm.png" alt="enter image description here"></p>