title: In iOS, should every UIView have a UIViewController?
body: <p>Many views have subviews that don't necessarily need to have their own controller associated with them. In Apple's <a href="https://developer.apple.com/library/prerelease/ios/referencelibrary/GettingStarted/DevelopiOSAppsSwift/Lesson5.html">own tutorial</a> on creating custom views, they don't actually create a sub UIViewController for each subview.</p>
  
  <p>However, often I run into situations where I'll have a view hierarchy where some subview of a subview has a button that sends a network request. In that case, I could do a target:</p>
  
  <pre><code>myView.addTarget(self, action: "networkRequest:", forControlEvents: UIControlEvents.TouchDown)
  </code></pre>
  
  <p>And then in the same myView class I could handle that network request, but that seems to break the MVC pattern. View's shouldn't do logic, they should just display stuff, correct? </p>
  
  <hr>
  
  <p><strong>Another option</strong> we could do is have each view have access to it's parent or grandparent controller that it needs for logic. In the case my target might look something like:</p>
  
  <pre><code>func networkRequest(view : MyView) {
      self.controller.doNetworkRequest()
  }
  </code></pre>
  
  <p>But that doesn't seem to be a correct solution either. Again, it seems like we're just breaking the MVC and weaseling out.</p>
  
  <hr>
  
  <p><strong>So instead, we're left with one of two options as far as I've seen:</strong></p>
  
  <p>First, we could add targets and all logic from the parent controller itself. But doing that gives us nasty chains like this:</p>
  
  <pre><code>self.grandParentView.parentView.childView.addTarget(self, action: "networkRequest:", forControlEvents: UIControlEvents.TouchDown)
  </code></pre>
  
  <p>That long list of accesses gives me the chills and just looks bad. But, it still seems to follow the MVC. Technically we're doing the logic in the controller, right?</p>
  
  <hr>
  
  <p><strong>But there might be another option.</strong> We could just give each view a controller and have each UIViewController have a sub-controller for each new subview. </p>
  
  <p>But, some views are static. They don't really have any logic, so they don't necessarily need a controller. But, we essentially need one for each view if we're going follow this convention, otherwise we have inconsistencies where a controller has a grandchild controller but no child controller. </p>
  
  <p>So we're left with creating a lot of empty caskets for our controllers. This builds up a lot of dead code that never gets used which can cause a bit of software rot. </p>
  
  <hr>
  
  <p><strong>So someone who's smarter and wiser than me</strong>, what's the correct solution here?</p>