title: Is there a good reason to have a pointer to UIViewController from custom UIView
body: <p>I have just inherited a code base and the project seems to be made up mainly of UIViews. </p>
  
  <p>Here is an example of a header file for a UIView which was written on 29/07/2014, so the code is relatively new:</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  
  @interface SettingsView : UIView {
      UIView *aView;
      UIViewController *controller;
  }
  @property(nonatomic,strong)UIView * aView;
  @property(nonatomic,strong)UIViewController * controller;
  
  @end
  </code></pre>
  
  <p>You can see that there is a pointer to a UIViewController. In the implementation file, the mainView is used in a few places. Here is an example:</p>
  
  <pre><code>MyView *myView = [[MyView alloc] initWithFrame:CGRectMake(0, yPos, scroller.frame.size.width, 50)];
  myView = 102;
  myView = mainView; // Here we are setting another view with this controller.
  [scroller myView];
  </code></pre>
  
  <p>To me this code doesn't feel right. However I would like to know if there is a good reason someone would have a pointer from a UIView to a UIViewController. I have seen my fair share of iOS code over the years and this is the first time I have seen this.</p>
  
  <p>Any insights would be much appreciated.</p>