title: Avoiding cross referencing in Objective-C
body: <p>I have a structure like this:</p>
  
  <pre><code> UIViewController
      SCNView
         SKScene
  </code></pre>
  
  <p>The <code>ViewController</code> creates and holds a <code>SCNView</code> and the <code>SCNView</code> holds a <code>SKScene</code> which is showing <code>GUI</code> elements. You can click on buttons of the <code>SKScene</code> to manipulate the <code>UIViewController</code>. The <code>SKScene</code> is calling functions of the <code>UIViewController</code>.</p>
  
  <p>This is where the cross reference is used, the <code>SKScene</code> has a reference to the <code>UIViewController</code> and the <code>UIViewController</code> is referencing the <code>SKScene</code> (through the <code>SCNView</code>).</p>
  
  <p>It is often suggested to avoid cross references, but how would I do it in this case?</p>
  
  <p>I can think of passing callbacks or even polling for variable changes but I think that would make the code much less clean.</p>